home *** CD-ROM | disk | FTP | other *** search
Unknown | 2000-02-28 | 12.1 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 05 43 6c 61 73 73 0f 4d | 53 43 61 6e 76 61 73 57 |.Class.M|SCanvasW|
|00000010| 69 74 68 50 69 63 3a a9 | 02 82 0e b8 09 07 00 0f |ithPic:.|........|
|00000020| 4d 53 43 61 6e 76 61 73 | 57 69 74 68 50 69 63 a4 |MSCanvas|WithPic.|
|00000030| 02 06 43 61 6e 76 61 73 | 00 10 15 50 69 63 74 4e |..Canvas|...PictN|
|00000040| 6f 72 6d 61 6c 20 61 73 | 20 70 69 63 74 75 72 65 |ormal as| picture|
|00000050| 01 11 63 61 70 74 69 6f | 6e 20 61 73 20 53 74 72 |..captio|n as Str|
|00000060| 69 6e 67 00 10 73 74 61 | 74 65 20 61 73 20 69 6e |ing..sta|te as in|
|00000070| 74 65 67 65 72 00 11 69 | 6e 44 6f 77 6e 20 61 73 |teger..i|nDown as|
|00000080| 20 62 6f 6f 6c 65 61 6e | 01 0d 67 20 61 73 20 67 | boolean|..g as g|
|00000090| 72 61 70 68 69 63 73 01 | 11 62 75 66 66 65 72 20 |raphics.|.buffer |
|000000a0| 61 73 20 70 69 63 74 75 | 72 65 01 12 74 65 78 74 |as pictu|re..text|
|000000b0| 46 6f 6e 74 20 61 73 20 | 73 74 72 69 6e 67 00 13 |Font as |string..|
|000000c0| 74 65 78 74 53 69 7a 65 | 20 61 73 20 69 6e 74 65 |textSize| as inte|
|000000d0| 67 65 72 00 16 61 75 74 | 6f 43 65 6e 74 65 72 56 |ger..aut|oCenterV|
|000000e0| 20 61 73 20 62 6f 6f 6c | 65 61 6e 00 12 44 61 72 | as bool|ean..Dar|
|000000f0| 6b 42 65 76 65 6c 20 61 | 73 20 63 6f 6c 6f 72 00 |kBevel a|s color.|
|00000100| 13 6c 69 67 68 74 42 65 | 76 65 6c 20 61 73 20 63 |.lightBe|vel as c|
|00000110| 6f 6c 6f 72 00 13 74 65 | 78 74 41 63 74 69 76 65 |olor..te|xtActive|
|00000120| 20 61 73 20 63 6f 6c 6f | 72 00 15 74 65 78 74 44 | as colo|r..textD|
|00000130| 69 73 61 62 6c 65 64 20 | 61 73 20 63 6f 6c 6f 72 |isabled |as color|
|00000140| 00 12 42 61 63 6b 43 6f | 6c 6f 72 20 61 73 20 63 |..BackCo|lor as c|
|00000150| 6f 6c 6f 72 00 1a 42 61 | 63 6b 43 6f 6c 6f 72 44 |olor..Ba|ckColorD|
|00000160| 69 73 61 62 6c 65 64 20 | 61 73 20 63 6f 6c 6f 72 |isabled |as color|
|00000170| 00 14 52 65 73 49 63 6f | 6e 49 44 20 61 73 20 69 |..ResIco|nID as i|
|00000180| 6e 74 65 67 65 72 00 0c | 09 67 65 74 53 57 69 64 |nteger..|.getSWid|
|00000190| 74 68 00 07 49 6e 74 65 | 67 65 72 00 03 00 03 00 |th..Inte|ger.....|
|000001a0| 0b 1f 46 75 6e 63 74 69 | 6f 6e 20 67 65 74 53 57 |..Functi|on getSW|
|000001b0| 69 64 74 68 28 29 20 41 | 73 20 49 6e 74 65 67 65 |idth() A|s Intege|
|000001c0| 72 00 3d 27 67 65 74 74 | 69 6e 67 20 73 74 72 69 |r.='gett|ing stri|
|000001d0| 6e 67 20 77 69 64 74 68 | 20 77 69 74 68 20 36 20 |ng width| with 6 |
|000001e0| 70 69 78 65 6c 73 20 6f | 6e 20 72 69 67 68 74 20 |pixels o|n right |
|000001f0| 73 69 64 65 2f 32 33 20 | 6f 6e 20 6c 65 66 74 2e |side/23 |on left.|
|00000200| 1c 67 72 61 70 68 69 63 | 73 2e 54 65 78 74 66 6f |.graphic|s.Textfo|
|00000210| 6e 74 20 3d 20 54 65 78 | 74 46 6f 6e 74 1c 67 72 |nt = Tex|tFont.gr|
|00000220| 61 70 68 69 63 73 2e 74 | 65 78 74 73 69 7a 65 20 |aphics.t|extsize |
|00000230| 3d 20 54 65 78 74 53 69 | 7a 65 29 69 66 20 67 72 |= TextSi|ze)if gr|
|00000240| 61 70 68 69 63 73 2e 73 | 74 72 69 6e 67 57 69 64 |aphics.s|tringWid|
|00000250| 74 68 28 63 61 70 74 69 | 6f 6e 29 20 3d 20 30 20 |th(capti|on) = 0 |
|00000260| 74 68 65 6e 0b 72 65 74 | 75 72 6e 20 67 65 74 58 |then.ret|urn getX|
|00000270| 06 65 6e 64 20 69 66 00 | 2f 72 65 74 75 72 6e 20 |.end if.|/return |
|00000280| 67 72 61 70 68 69 63 73 | 2e 73 74 72 69 6e 67 57 |graphics|.stringW|
|00000290| 69 64 74 68 28 63 61 70 | 74 69 6f 6e 29 20 2b 20 |idth(cap|tion) + |
|000002a0| 67 65 74 58 20 2b 20 35 | 0c 45 6e 64 20 46 75 6e |getX + 5|.End Fun|
|000002b0| 63 74 69 6f 6e 04 64 6f | 77 6e 00 00 01 24 00 24 |ction.do|wn...$.$|
|000002c0| 00 29 0a 53 75 62 20 64 | 6f 77 6e 28 29 14 27 63 |.).Sub d|own().'c|
|000002d0| 68 65 63 6b 69 6e 67 20 | 69 66 20 61 63 74 69 76 |hecking |if activ|
|000002e0| 65 20 13 69 66 20 6e 6f | 74 20 65 6e 61 62 6c 65 |e .if no|t enable|
|000002f0| 64 20 74 68 65 6e 0d 45 | 6e 61 62 6c 65 28 66 61 |d then.E|nable(fa|
|00000300| 6c 73 65 29 06 72 65 74 | 75 72 6e 06 65 6e 64 20 |lse).ret|urn.end |
|00000310| 69 66 00 3c 27 64 72 61 | 77 69 6e 67 20 70 69 63 |if.<'dra|wing pic|
|00000320| 74 75 72 65 20 6f 66 66 | 2d 73 63 72 65 65 6e 20 |ture off|-screen |
|00000330| 62 65 66 6f 72 65 20 73 | 65 74 74 69 6e 67 20 70 |before s|etting p|
|00000340| 69 63 74 75 72 65 20 6f | 6e 20 43 61 6e 76 61 73 |icture o|n Canvas|
|00000350| 33 62 75 66 66 65 72 20 | 3d 20 6e 65 77 50 69 63 |3buffer |= newPic|
|00000360| 74 75 72 65 28 77 69 64 | 74 68 2c 20 68 65 69 67 |ture(wid|th, heig|
|00000370| 68 74 2c 20 73 63 72 65 | 65 6e 28 30 29 2e 64 65 |ht, scre|en(0).de|
|00000380| 70 74 68 29 13 67 20 3d | 20 62 75 66 66 65 72 2e |pth).g =| buffer.|
|00000390| 67 72 61 70 68 69 63 73 | 00 3c 27 66 69 6c 6c 69 |graphics|.<'filli|
|000003a0| 6e 67 20 74 68 65 20 62 | 75 74 74 6f 6e 20 62 61 |ng the b|utton ba|
|000003b0| 63 6b 67 72 6f 75 6e 64 | 20 77 69 74 68 20 63 75 |ckground| with cu|
|000003c0| 72 72 65 6e 74 20 62 61 | 63 6b 67 72 6f 75 6e 64 |rrent ba|ckground|
|000003d0| 20 63 6f 6c 6f 72 17 67 | 2e 66 6f 72 65 43 6f 6c | color.g|.foreCol|
|000003e0| 6f 72 20 3d 20 42 61 63 | 6b 43 6f 6c 6f 72 1c 67 |or = Bac|kColor.g|
|000003f0| 2e 66 69 6c 6c 52 65 63 | 74 28 30 2c 30 2c 77 69 |.fillRec|t(0,0,wi|
|00000400| 64 74 68 2c 68 65 69 67 | 68 74 29 00 16 27 44 72 |dth,heig|ht)..'Dr|
|00000410| 61 77 69 6e 67 20 62 75 | 74 74 6f 6e 20 70 75 73 |awing bu|tton pus|
|00000420| 68 65 64 18 67 2e 66 6f | 72 65 43 6f 6c 6f 72 20 |hed.g.fo|reColor |
|00000430| 3d 20 44 61 72 6b 42 65 | 76 65 6c 20 1b 67 2e 64 |= DarkBe|vel .g.d|
|00000440| 72 61 77 6c 69 6e 65 28 | 30 2c 20 30 2c 20 30 2c |rawline(|0, 0, 0,|
|00000450| 20 77 69 64 74 68 29 20 | 1b 67 2e 64 72 61 77 6c | width) |.g.drawl|
|00000460| 69 6e 65 28 30 2c 20 30 | 2c 20 77 69 64 74 68 2c |ine(0, 0|, width,|
|00000470| 30 20 29 20 19 67 2e 66 | 6f 72 65 43 6f 6c 6f 72 |0 ) .g.f|oreColor|
|00000480| 20 3d 20 4c 69 67 68 74 | 42 65 76 65 6c 20 29 67 | = Light|Bevel )g|
|00000490| 2e 64 72 61 77 6c 69 6e | 65 28 77 69 64 74 68 2d |.drawlin|e(width-|
|000004a0| 31 2c 20 31 2c 20 77 69 | 64 74 68 2d 31 2c 20 68 |1, 1, wi|dth-1, h|
|000004b0| 65 69 67 68 74 2d 31 29 | 2a 67 2e 64 72 61 77 6c |eight-1)|*g.drawl|
|000004c0| 69 6e 65 28 31 2c 20 68 | 65 69 67 68 74 2d 31 2c |ine(1, h|eight-1,|
|000004d0| 20 77 69 64 74 68 2d 31 | 2c 20 68 65 69 67 68 74 | width-1|, height|
|000004e0| 2d 31 29 00 1e 27 73 65 | 74 74 69 6e 67 20 66 6f |-1)..'se|tting fo|
|000004f0| 6e 74 20 74 6f 20 64 6f | 77 6e 20 70 6f 73 69 74 |nt to do|wn posit|
|00000500| 69 6f 6e 18 67 2e 66 6f | 72 65 43 6f 6c 6f 72 20 |ion.g.fo|reColor |
|00000510| 3d 20 74 65 78 74 41 63 | 74 69 76 65 15 67 2e 54 |= textAc|tive.g.T|
|00000520| 65 78 74 66 6f 6e 74 20 | 3d 20 54 65 78 74 46 6f |extfont |= TextFo|
|00000530| 6e 74 15 67 2e 74 65 78 | 74 73 69 7a 65 20 3d 20 |nt.g.tex|tsize = |
|00000540| 54 65 78 74 53 69 7a 65 | 00 39 27 73 65 74 20 64 |TextSize|.9'set d|
|00000550| 6f 77 6e 20 74 65 78 74 | 20 78 2c 20 79 20 70 6f |own text| x, y po|
|00000560| 73 69 74 69 6f 6e 20 68 | 65 72 65 20 28 73 68 69 |sition h|ere (shi|
|00000570| 66 74 20 6e 6f 72 6d 61 | 6c 20 32 20 70 69 78 65 |ft norma|l 2 pixe|
|00000580| 6c 73 29 28 67 2e 64 72 | 61 77 73 74 72 69 6e 67 |ls)(g.dr|awstring|
|00000590| 20 63 61 70 74 69 6f 6e | 2c 20 67 65 74 58 20 2b | caption|, getX +|
|000005a0| 20 32 2c 20 67 65 74 59 | 20 2b 20 32 00 33 27 64 | 2, getY| + 2.3'd|
|000005b0| 72 61 77 69 6e 67 20 70 | 69 63 74 75 72 65 20 28 |rawing p|icture (|
|000005c0| 70 69 63 74 75 72 65 20 | 73 68 6f 75 6c 64 20 62 |picture |should b|
|000005d0| 65 20 31 36 20 78 20 31 | 36 20 70 69 78 65 6c 73 |e 16 x 1|6 pixels|
|000005e0| 29 28 27 67 2e 64 72 61 | 77 50 69 63 74 75 72 65 |)('g.dra|wPicture|
|000005f0| 20 70 69 63 74 44 6f 77 | 6e 2c 20 35 2c 20 67 65 | pictDow|n, 5, ge|
|00000600| 74 50 69 63 74 59 20 2b | 20 32 0a 64 72 61 77 49 |tPictY +| 2.drawI|
|00000610| 63 6f 6e 28 29 00 23 27 | 64 72 61 77 69 6e 67 20 |con().#'|drawing |
|00000620| 70 69 63 74 75 72 65 20 | 28 62 75 74 74 6f 6e 29 |picture |(button)|
|00000630| 20 6f 6e 20 43 61 6e 76 | 61 73 21 67 72 61 70 68 | on Canv|as!graph|
|00000640| 69 63 73 2e 64 72 61 77 | 50 69 63 74 75 72 65 20 |ics.draw|Picture |
|00000650| 62 75 66 66 65 72 2c 20 | 30 2c 20 30 00 00 06 65 |buffer, |0, 0...e|
|00000660| 6e 64 20 69 66 07 45 6e | 64 20 53 75 62 06 65 6e |nd if.En|d Sub.en|
|00000670| 61 62 6c 65 13 61 63 74 | 69 76 61 74 65 20 61 73 |able.act|ivate as|
|00000680| 20 62 6f 6f 6c 65 61 6e | 00 00 1d 0a 1d 0a 24 1f | boolean|......$.|
|00000690| 53 75 62 20 65 6e 61 62 | 6c 65 28 61 63 74 69 76 |Sub enab|le(activ|
|000006a0| 61 74 65 20 61 73 20 62 | 6f 6f 6c 65 61 6e 29 00 |ate as b|oolean).|
|000006b0| 3c 27 49 66 20 56 61 6c | 75 65 20 3d 20 74 72 75 |<'If Val|ue = tru|
|000006c0| 65 20 74 68 65 6e 20 65 | 6e 61 62 6c 69 6e 67 20 |e then e|nabling |
|000006d0| 74 68 65 20 62 75 74 74 | 6f 6e 2c 20 6f 74 68 65 |the butt|on, othe|
|000006e0| 72 77 69 73 65 20 64 72 | 61 77 69 6e 67 0d 27 69 |rwise dr|awing.'i|
|000006f0| 74 20 64 69 73 61 62 6c | 65 64 2e 00 10 69 66 20 |t disabl|ed...if |
|00000700| 61 63 74 69 76 61 74 65 | 20 74 68 65 6e 0e 65 6e |activate| then.en|
|00000710| 61 62 6c 65 64 20 3d 20 | 74 72 75 65 09 73 74 61 |abled = |true.sta|
|00000720| 74 65 20 3d 20 30 08 6e | 6f 72 6d 61 6c 28 29 04 |te = 0.n|ormal().|
|00000730| 65 6c 73 65 00 0f 65 6e | 61 62 6c 65 64 20 3d 20 |else..en|abled = |
|00000740| 66 61 6c 73 65 00 3c 27 | 64 72 61 77 69 6e 67 20 |false.<'|drawing |
|00000750| 70 69 63 74 75 72 65 20 | 6f 66 66 2d 73 63 72 65 |picture |off-scre|
|00000760| 65 6e 20 62 65 66 6f 72 | 65 20 73 65 74 74 69 6e |en befor|e settin|
|00000770| 67 20 70 69 63 74 75 72 | 65 20 6f 6e 20 43 61 6e |g pictur|e on Can|
|00000780| 76 61 73 33 62 75 66 66 | 65 72 20 3d 20 6e 65 77 |vas3buff|er = new|
|00000790| 50 69 63 74 75 72 65 28 | 77 69 64 74 68 2c 20 68 |Picture(|width, h|
|000007a0| 65 69 67 68 74 2c 20 73 | 63 72 65 65 6e 28 30 29 |eight, s|creen(0)|
|000007b0| 2e 64 65 70 74 68 29 13 | 67 20 3d 20 62 75 66 66 |.depth).|g = buff|
|000007c0| 65 72 2e 67 72 61 70 68 | 69 63 73 00 3c 27 66 69 |er.graph|ics.<'fi|
|000007d0| 6c 6c 69 6e 67 20 74 68 | 65 20 62 75 74 74 6f 6e |lling th|e button|
|000007e0| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 77 69 74 68 | backgro|und with|
|000007f0| 20 63 75 72 72 65 6e 74 | 20 62 61 63 6b 67 72 6f | current| backgro|
|00000800| 75 6e 64 20 63 6f 6c 6f | 72 1f 67 2e 66 6f 72 65 |und colo|r.g.fore|
|00000810| 43 6f 6c 6f 72 20 3d 20 | 42 61 63 6b 43 6f 6c 6f |Color = |BackColo|
|00000820| 72 44 69 73 61 62 6c 65 | 64 1d 67 2e 66 69 6c 6c |rDisable|d.g.fill|
|00000830| 52 65 63 74 28 30 2c 30 | 2c 77 69 64 74 68 2c 20 |Rect(0,0|,width, |
|00000840| 68 65 69 67 68 74 29 00 | 1a 67 2e 66 6f 72 65 43 |height).|.g.foreC|
|00000850| 6f 6c 6f 72 20 3d 20 74 | 65 78 74 64 69 73 61 62 |olor = t|extdisab|
|00000860| 6c 65 64 15 67 2e 54 65 | 78 74 66 6f 6e 74 20 3d |led.g.Te|xtfont =|
|00000870| 20 54 65 78 74 46 6f 6e | 74 15 67 2e 74 65 78 74 | TextFon|t.g.text|
|00000880| 73 69 7a 65 20 3d 20 54 | 65 78 74 53 69 7a 65 23 |size = T|extSize#|
|00000890| 27 73 65 74 20 6e 6f 72 | 6d 61 6c 20 74 65 78 74 |'set nor|mal text|
|000008a0| 20 78 2c 20 79 20 70 6f | 73 69 74 69 6f 6e 20 68 | x, y po|sition h|
|000008b0| 65 72 65 20 67 2e 64 72 | 61 77 73 74 72 69 6e 67 |ere g.dr|awstring|
|000008c0| 20 63 61 70 74 69 6f 6e | 2c 20 67 65 74 58 2c 20 | caption|, getX, |
|000008d0| 67 65 74 59 00 33 27 64 | 72 61 77 69 6e 67 20 70 |getY.3'd|rawing p|
|000008e0| 69 63 74 75 72 65 20 28 | 70 69 63 74 75 72 65 20 |icture (|picture |
|000008f0| 73 68 6f 75 6c 64 20 62 | 65 20 31 36 20 78 20 31 |should b|e 16 x 1|
|00000900| 36 20 70 69 78 65 6c 73 | 29 28 27 67 2e 64 72 61 |6 pixels|)('g.dra|
|00000910| 77 50 69 63 74 75 72 65 | 20 70 69 63 74 44 69 73 |wPicture| pictDis|
|00000920| 61 62 6c 65 64 2c 20 33 | 2c 20 67 65 74 50 69 63 |abled, 3|, getPic|
|00000930| 74 59 0a 64 72 61 77 49 | 63 6f 6e 28 29 00 23 27 |tY.drawI|con().#'|
|00000940| 64 72 61 77 69 6e 67 20 | 70 69 63 74 75 72 65 20 |drawing |picture |
|00000950| 28 62 75 74 74 6f 6e 29 | 20 6f 6e 20 43 61 6e 76 |(button)| on Canv|
|00000960| 61 73 21 67 72 61 70 68 | 69 63 73 2e 64 72 61 77 |as!graph|ics.draw|
|00000970| 50 69 63 74 75 72 65 20 | 62 75 66 66 65 72 2c 20 |Picture |buffer, |
|00000980| 30 2c 20 30 06 65 6e 64 | 20 69 66 00 07 45 6e 64 |0, 0.end| if..End|
|00000990| 20 53 75 62 06 6e 6f 72 | 6d 61 6c 00 00 01 28 00 | Sub.nor|mal...(.|
|000009a0| 28 00 2a 0c 53 75 62 20 | 6e 6f 72 6d 61 6c 28 29 |(.*.Sub |normal()|
|000009b0| 00 14 27 63 68 65 63 6b | 69 6e 67 20 69 66 20 61 |..'check|ing if a|
|000009c0| 63 74 69 76 65 20 13 69 | 66 20 6e 6f 74 20 65 6e |ctive .i|f not en|
|000009d0| 61 62 6c 65 64 20 74 68 | 65 6e 0d 45 6e 61 62 6c |abled th|en.Enabl|
|000009e0| 65 28 66 61 6c 73 65 29 | 06 72 65 74 75 72 6e 06 |e(false)|.return.|
|000009f0| 65 6e 64 20 69 66 00 3b | 27 77 68 65 6e 20 62 75 |end if.;|'when bu|
|00000a00| 74 74 6f 6e 20 69 73 20 | 73 68 6f 77 6e 20 69 6e |tton is |shown in|
|00000a10| 20 74 68 65 20 6e 6f 72 | 6d 61 6c 20 73 74 61 74 | the nor|mal stat|
|00000a20| 65 2c 20 63 75 72 73 6f | 72 20 69 73 20 6e 6f 72 |e, curso|r is nor|
|00000a30| 6d 61 6c 15 61 70 70 2e | 6d 6f 75 73 65 43 75 72 |mal.app.|mouseCur|
|00000a40| 73 6f 72 20 3d 20 6e 69 | 6c 00 3c 27 64 72 61 77 |sor = ni|l.<'draw|
|00000a50| 69 6e 67 20 70 69 63 74 | 75 72 65 20 6f 66 66 2d |ing pict|ure off-|
|00000a60| 73 63 72 65 65 6e 20 62 | 65 66 6f 72 65 20 73 65 |screen b|efore se|
|00000a70| 74 74 69 6e 67 20 70 69 | 63 74 75 72 65 20 6f 6e |tting pi|cture on|
|00000a80| 20 43 61 6e 76 61 73 33 | 62 75 66 66 65 72 20 3d | Canvas3|buffer =|
|00000a90| 20 6e 65 77 50 69 63 74 | 75 72 65 28 77 69 64 74 | newPict|ure(widt|
|00000aa0| 68 2c 20 68 65 69 67 68 | 74 2c 20 73 63 72 65 65 |h, heigh|t, scree|
|00000ab0| 6e 28 30 29 2e 64 65 70 | 74 68 29 13 67 20 3d 20 |n(0).dep|th).g = |
|00000ac0| 62 75 66 66 65 72 2e 67 | 72 61 70 68 69 63 73 00 |buffer.g|raphics.|
|00000ad0| 3c 27 66 69 6c 6c 69 6e | 67 20 74 68 65 20 62 75 |<'fillin|g the bu|
|00000ae0| 74 74 6f 6e 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |tton bac|kground |
|00000af0| 77 69 74 68 20 63 75 72 | 72 65 6e 74 20 62 61 63 |with cur|rent bac|
|00000b00| 6b 67 72 6f 75 6e 64 20 | 63 6f 6c 6f 72 17 67 2e |kground |color.g.|
|00000b10| 66 6f 72 65 43 6f 6c 6f | 72 20 3d 20 42 61 63 6b |foreColo|r = Back|
|00000b20| 43 6f 6c 6f 72 1e 67 2e | 66 69 6c 6c 52 65 63 74 |Color.g.|fillRect|
|00000b30| 28 30 2c 30 2c 20 77 69 | 64 74 68 2c 20 68 65 69 |(0,0, wi|dth, hei|
|00000b40| 67 68 74 29 00 0e 27 64 | 72 61 77 69 6e 67 20 74 |ght)..'d|rawing t|
|00000b50| 65 78 74 20 18 67 2e 66 | 6f 72 65 43 6f 6c 6f 72 |ext .g.f|oreColor|
|00000b60| 20 3d 20 74 65 78 74 41 | 63 74 69 76 65 15 67 2e | = textA|ctive.g.|
|00000b70| 54 65 78 74 66 6f 6e 74 | 20 3d 20 54 65 78 74 46 |Textfont| = TextF|
|00000b80| 6f 6e 74 15 67 2e 74 65 | 78 74 73 69 7a 65 20 3d |ont.g.te|xtsize =|
|00000b90| 20 54 65 78 74 53 69 7a | 65 23 27 73 65 74 20 6e | TextSiz|e#'set n|
|00000ba0| 6f 72 6d 61 6c 20 74 65 | 78 74 20 78 2c 20 79 20 |ormal te|xt x, y |
|00000bb0| 70 6f 73 69 74 69 6f 6e | 20 68 65 72 65 00 12 27 |position| here..'|
|00000bc0| 4f 75 74 6c 6f 6f 6b 20 | 73 74 61 6e 64 61 72 64 |Outlook |standard|
|00000bd0| 73 19 27 20 78 20 77 69 | 74 68 20 69 63 6f 6e 20 |s.' x wi|th icon |
|00000be0| 2d 20 32 33 20 70 69 78 | 65 6c 73 18 27 79 20 77 |- 23 pix|els.'y w|
|00000bf0| 69 74 68 20 69 63 6f 6e | 20 2d 20 31 35 20 70 69 |ith icon| - 15 pi|
|00000c00| 78 65 6c 73 24 27 36 20 | 70 69 78 65 6c 73 20 62 |xels$'6 |pixels b|
|00000c10| 69 67 67 65 72 20 74 68 | 65 6e 20 77 69 64 74 68 |igger th|en width|
|00000c20| 20 6f 6e 20 72 69 67 68 | 74 1c 27 32 33 20 70 69 | on righ|t.'23 pi|
|00000c30| 78 65 6c 73 20 77 69 74 | 68 20 69 63 6f 6e 20 6f |xels wit|h icon o|
|00000c40| 6e 20 6c 65 66 74 12 27 | 36 20 77 69 74 68 6f 75 |n left.'|6 withou|
|00000c50| 74 20 6f 6e 20 6c 65 66 | 74 00 21 27 64 72 61 77 |t on lef|t.!'draw|
|00000c60| 69 6e 67 20 62 75 74 74 | 6f 6e 20 63 61 70 74 69 |ing butt|on capti|
|00000c70| 6f 6e 20 74 6f 20 62 75 | 66 66 65 72 20 67 2e 64 |on to bu|ffer g.d|
|00000c80| 72 61 77 73 74 72 69 6e | 67 20 63 61 70 74 69 6f |rawstrin|g captio|
|00000c90| 6e 2c 20 67 65 74 58 2c | 20 67 65 74 59 00 33 27 |n, getX,| getY.3'|
|00000ca0| 64 72 61 77 69 6e 67 20 | 70 69 63 74 75 72 65 20 |drawing |picture |
|00000cb0| 28 70 69 63 74 75 72 65 | 20 73 68 6f 75 6c 64 20 |(picture| should |
|00000cc0| 62 65 20 31 36 20 78 20 | 31 36 20 70 69 78 65 6c |be 16 x |16 pixel|
|00000cd0| 73 29 26 27 67 2e 64 72 | 61 77 50 69 63 74 75 72 |s)&'g.dr|awPictur|
|00000ce0| 65 20 70 69 63 74 4e 6f | 72 6d 61 6c 2c 20 33 2c |e pictNo|rmal, 3,|
|00000cf0| 20 67 65 74 50 69 63 74 | 59 0a 64 72 61 77 49 63 | getPict|Y.drawIc|
|00000d00| 6f 6e 28 29 00 23 27 64 | 72 61 77 69 6e 67 20 70 |on().#'d|rawing p|
|00000d10| 69 63 74 75 72 65 20 28 | 62 75 74 74 6f 6e 29 20 |icture (|button) |
|00000d20| 6f 6e 20 43 61 6e 76 61 | 73 21 67 72 61 70 68 69 |on Canva|s!graphi|
|00000d30| 63 73 2e 64 72 61 77 50 | 69 63 74 75 72 65 20 62 |cs.drawP|icture b|
|00000d40| 75 66 66 65 72 2c 20 30 | 2c 20 30 07 45 6e 64 20 |uffer, 0|, 0.End |
|00000d50| 53 75 62 02 75 70 00 00 | 01 26 00 26 00 28 08 53 |Sub.up..|.&.&.(.S|
|00000d60| 75 62 20 75 70 28 29 00 | 14 27 63 68 65 63 6b 69 |ub up().|.'checki|
|00000d70| 6e 67 20 69 66 20 61 63 | 74 69 76 65 20 13 69 66 |ng if ac|tive .if|
|00000d80| 20 6e 6f 74 20 65 6e 61 | 62 6c 65 64 20 74 68 65 | not ena|bled the|
|00000d90| 6e 0d 45 6e 61 62 6c 65 | 28 66 61 6c 73 65 29 06 |n.Enable|(false).|
|00000da0| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 00 2a 27 |return.e|nd if.*'|
|00000db0| 63 68 61 6e 67 69 6e 67 | 20 63 75 72 73 6f 72 20 |changing| cursor |
|00000dc0| 77 68 65 6e 20 6d 6f 75 | 73 65 20 69 6e 20 69 6e |when mou|se in in|
|00000dd0| 20 63 6f 6e 74 72 6f 6c | 20 31 61 70 70 2e 6d 6f | control| 1app.mo|
|00000de0| 75 73 65 63 75 72 73 6f | 72 20 3d 20 61 70 70 2e |usecurso|r = app.|
|00000df0| 72 65 73 6f 75 72 63 65 | 46 6f 72 6b 2e 67 65 74 |resource|Fork.get|
|00000e00| 63 75 72 73 6f 72 28 31 | 33 39 29 00 3c 27 64 72 |cursor(1|39).<'dr|
|00000e10| 61 77 69 6e 67 20 70 69 | 63 74 75 72 65 20 6f 66 |awing pi|cture of|
|00000e20| 66 2d 73 63 72 65 65 6e | 20 62 65 66 6f 72 65 20 |f-screen| before |
|00000e30| 73 65 74 74 69 6e 67 20 | 70 69 63 74 75 72 65 20 |setting |picture |
|00000e40| 6f 6e 20 43 61 6e 76 61 | 73 33 62 75 66 66 65 72 |on Canva|s3buffer|
|00000e50| 20 3d 20 6e 65 77 50 69 | 63 74 75 72 65 28 77 69 | = newPi|cture(wi|
|00000e60| 64 74 68 2c 20 68 65 69 | 67 68 74 2c 20 73 63 72 |dth, hei|ght, scr|
|00000e70| 65 65 6e 28 30 29 2e 64 | 65 70 74 68 29 13 67 20 |een(0).d|epth).g |
|00000e80| 3d 20 62 75 66 66 65 72 | 2e 67 72 61 70 68 69 63 |= buffer|.graphic|
|00000e90| 73 00 3c 27 66 69 6c 6c | 69 6e 67 20 74 68 65 20 |s.<'fill|ing the |
|00000ea0| 62 75 74 74 6f 6e 20 62 | 61 63 6b 67 72 6f 75 6e |button b|ackgroun|
|00000eb0| 64 20 77 69 74 68 20 63 | 75 72 72 65 6e 74 20 62 |d with c|urrent b|
|00000ec0| 61 63 6b 67 72 6f 75 6e | 64 20 63 6f 6c 6f 72 17 |ackgroun|d color.|
|00000ed0| 67 2e 66 6f 72 65 43 6f | 6c 6f 72 20 3d 20 42 61 |g.foreCo|lor = Ba|
|00000ee0| 63 6b 43 6f 6c 6f 72 1e | 67 2e 66 69 6c 6c 52 65 |ckColor.|g.fillRe|
|00000ef0| 63 74 28 30 2c 30 2c 20 | 77 69 64 74 68 2c 20 68 |ct(0,0, |width, h|
|00000f00| 65 69 67 68 74 29 00 1b | 27 64 72 61 77 69 6e 67 |eight)..|'drawing|
|00000f10| 20 62 75 74 74 6f 6e 20 | 6d 6f 75 73 65 64 20 6f | button |moused o|
|00000f20| 76 65 72 19 67 2e 66 6f | 72 65 43 6f 6c 6f 72 20 |ver.g.fo|reColor |
|00000f30| 3d 20 6c 69 67 68 74 42 | 65 76 65 6c 20 1b 67 2e |= lightB|evel .g.|
|00000f40| 64 72 61 77 6c 69 6e 65 | 28 30 2c 20 30 2c 20 30 |drawline|(0, 0, 0|
|00000f50| 2c 20 77 69 64 74 68 29 | 20 1b 67 2e 64 72 61 77 |, width)| .g.draw|
|00000f60| 6c 69 6e 65 28 30 2c 20 | 30 2c 20 77 69 64 74 68 |line(0, |0, width|
|00000f70| 2c 30 20 29 20 18 67 2e | 66 6f 72 65 43 6f 6c 6f |,0 ) .g.|foreColo|
|00000f80| 72 20 3d 20 44 61 72 6b | 42 65 76 65 6c 20 29 67 |r = Dark|Bevel )g|
|00000f90| 2e 64 72 61 77 6c 69 6e | 65 28 77 69 64 74 68 2d |.drawlin|e(width-|
|00000fa0| 31 2c 20 31 2c 20 77 69 | 64 74 68 2d 31 2c 20 68 |1, 1, wi|dth-1, h|
|00000fb0| 65 69 67 68 74 2d 31 29 | 2a 67 2e 64 72 61 77 6c |eight-1)|*g.drawl|
|00000fc0| 69 6e 65 28 31 2c 20 68 | 65 69 67 68 74 2d 31 2c |ine(1, h|eight-1,|
|00000fd0| 20 77 69 64 74 68 2d 31 | 2c 20 68 65 69 67 68 74 | width-1|, height|
|00000fe0| 2d 31 29 0e 27 64 72 61 | 77 69 6e 67 20 74 65 78 |-1).'dra|wing tex|
|00000ff0| 74 20 18 67 2e 66 6f 72 | 65 43 6f 6c 6f 72 20 3d |t .g.for|eColor =|
|00001000| 20 74 65 78 74 41 63 74 | 69 76 65 15 67 2e 54 65 | textAct|ive.g.Te|
|00001010| 78 74 66 6f 6e 74 20 3d | 20 54 65 78 74 46 6f 6e |xtfont =| TextFon|
|00001020| 74 15 67 2e 74 65 78 74 | 73 69 7a 65 20 3d 20 54 |t.g.text|size = T|
|00001030| 65 78 74 53 69 7a 65 23 | 27 73 65 74 20 6e 6f 72 |extSize#|'set nor|
|00001040| 6d 61 6c 20 74 65 78 74 | 20 78 2c 20 79 20 70 6f |mal text| x, y po|
|00001050| 73 69 74 69 6f 6e 20 68 | 65 72 65 20 67 2e 64 72 |sition h|ere g.dr|
|00001060| 61 77 73 74 72 69 6e 67 | 20 63 61 70 74 69 6f 6e |awstring| caption|
|00001070| 2c 20 67 65 74 58 2c 20 | 67 65 74 59 00 33 27 64 |, getX, |getY.3'd|
|00001080| 72 61 77 69 6e 67 20 70 | 69 63 74 75 72 65 20 28 |rawing p|icture (|
|00001090| 70 69 63 74 75 72 65 20 | 73 68 6f 75 6c 64 20 62 |picture |should b|
|000010a0| 65 20 31 36 20 78 20 31 | 36 20 70 69 78 65 6c 73 |e 16 x 1|6 pixels|
|000010b0| 29 26 27 67 2e 64 72 61 | 77 50 69 63 74 75 72 65 |)&'g.dra|wPicture|
|000010c0| 20 70 69 63 74 4e 6f 72 | 6d 61 6c 2c 20 33 2c 20 | pictNor|mal, 3, |
|000010d0| 67 65 74 50 69 63 74 59 | 0a 64 72 61 77 49 63 6f |getPictY|.drawIco|
|000010e0| 6e 28 29 00 23 27 64 72 | 61 77 69 6e 67 20 70 69 |n().#'dr|awing pi|
|000010f0| 63 74 75 72 65 20 28 62 | 75 74 74 6f 6e 29 20 6f |cture (b|utton) o|
|00001100| 6e 20 43 61 6e 76 61 73 | 21 67 72 61 70 68 69 63 |n Canvas|!graphic|
|00001110| 73 2e 64 72 61 77 50 69 | 63 74 75 72 65 20 62 75 |s.drawPi|cture bu|
|00001120| 66 66 65 72 2c 20 30 2c | 20 30 07 45 6e 64 20 53 |ffer, 0,| 0.End S|
|00001130| 75 62 08 67 65 74 50 69 | 63 74 59 00 07 49 6e 74 |ub.getPi|ctY..Int|
|00001140| 65 67 65 72 01 02 0e 02 | 0e 08 1e 46 75 6e 63 74 |eger....|...Funct|
|00001150| 69 6f 6e 20 67 65 74 50 | 69 63 74 59 28 29 20 41 |ion getP|ictY() A|
|00001160| 73 20 49 6e 74 65 67 65 | 72 3e 27 72 65 74 75 72 |s Intege|r>'retur|
|00001170| 6e 73 20 74 68 65 20 70 | 69 63 74 20 79 20 70 6f |ns the p|ict y po|
|00001180| 73 69 74 69 6f 6e 20 6e | 6f 20 6d 61 74 74 65 72 |sition n|o matter|
|00001190| 20 77 68 61 74 20 73 69 | 7a 65 20 74 68 65 20 62 | what si|ze the b|
|000011a0| 75 74 74 6f 6e 20 69 73 | 13 69 66 20 61 75 74 6f |utton is|.if auto|
|000011b0| 43 65 6e 74 65 72 56 20 | 74 68 65 6e 29 72 65 74 |CenterV |then)ret|
|000011c0| 75 72 6e 20 28 20 68 65 | 69 67 68 74 20 2d 20 70 |urn ( he|ight - p|
|000011d0| 69 63 74 4e 6f 72 6d 61 | 6c 2e 68 65 69 67 68 74 |ictNorma|l.height|
|000011e0| 20 29 20 2f 20 32 04 65 | 6c 73 65 08 72 65 74 75 | ) / 2.e|lse.retu|
|000011f0| 72 6e 20 33 06 65 6e 64 | 20 69 66 0c 45 6e 64 20 |rn 3.end| if.End |
|00001200| 46 75 6e 63 74 69 6f 6e | 04 67 65 74 59 00 07 49 |Function|.getY..I|
|00001210| 6e 74 65 67 65 72 01 0d | 00 0d 00 14 1a 46 75 6e |nteger..|.....Fun|
|00001220| 63 74 69 6f 6e 20 67 65 | 74 59 28 29 20 41 73 20 |ction ge|tY() As |
|00001230| 49 6e 74 65 67 65 72 3e | 27 72 65 74 75 72 6e 73 |Integer>|'returns|
|00001240| 20 74 68 65 20 63 6f 72 | 72 65 63 74 20 59 20 64 | the cor|rect Y d|
|00001250| 69 73 74 61 6e 63 65 20 | 66 6f 72 20 74 65 78 74 |istance |for text|
|00001260| 20 74 6f 20 62 65 20 69 | 6e 20 74 68 65 20 63 6f | to be i|n the co|
|00001270| 72 72 65 63 74 20 1d 27 | 70 6f 73 69 74 69 6f 6e |rrect .'|position|
|00001280| 20 6e 6f 20 6d 61 74 74 | 65 72 20 77 68 61 74 20 | no matt|er what |
|00001290| 66 6f 6e 74 00 10 64 69 | 6d 20 70 20 61 73 20 70 |font..di|m p as p|
|000012a0| 69 63 74 75 72 65 11 64 | 69 6d 20 72 20 61 73 20 |icture.d|im r as |
|000012b0| 67 72 61 70 68 69 63 73 | 00 19 70 20 3d 20 6e 65 |graphics|..p = ne|
|000012c0| 77 50 69 63 74 75 72 65 | 28 20 31 2c 20 31 2c 20 |wPicture|( 1, 1, |
|000012d0| 31 20 29 0e 72 20 3d 20 | 70 2e 67 72 61 70 68 69 |1 ).r = |p.graphi|
|000012e0| 63 73 00 15 72 2e 74 65 | 78 74 46 6f 6e 74 20 3d |cs..r.te|xtFont =|
|000012f0| 20 74 65 78 74 46 6f 6e | 74 15 72 2e 74 65 78 74 | textFon|t.r.text|
|00001300| 53 69 7a 65 20 3d 20 74 | 65 78 74 53 69 7a 65 00 |Size = t|extSize.|
|00001310| 13 69 66 20 61 75 74 6f | 43 65 6e 74 65 72 56 20 |.if auto|CenterV |
|00001320| 74 68 65 6e 87 01 72 65 | 74 75 72 6e 20 28 20 28 |then..re|turn ( (|
|00001330| 20 68 65 69 67 68 74 20 | 2d 20 72 2e 74 65 78 74 | height |- r.text|
|00001340| 48 65 69 67 68 74 20 20 | 29 20 2f 20 32 20 29 20 |Height |) / 2 ) |
|00001350| 2b 20 28 20 72 2e 74 65 | 78 74 48 65 69 67 68 74 |+ ( r.te|xtHeight|
|00001360| 20 2a 20 30 2e 37 35 20 | 29 20 2b 20 31 04 65 6c | * 0.75 |) + 1.el|
|00001370| 73 65 09 72 65 74 75 72 | 6e 20 31 35 06 65 6e 64 |se.retur|n 15.end|
|00001380| 20 69 66 00 0c 45 6e 64 | 20 46 75 6e 63 74 69 6f | if..End| Functio|
|00001390| 6e 04 67 65 74 58 00 07 | 49 6e 74 65 67 65 72 01 |n.getX..|Integer.|
|000013a0| 16 04 16 04 18 1a 46 75 | 6e 63 74 69 6f 6e 20 67 |......Fu|nction g|
|000013b0| 65 74 58 28 29 20 41 73 | 20 49 6e 74 65 67 65 72 |etX() As| Integer|
|000013c0| 18 64 69 6d 20 70 69 63 | 74 57 69 64 74 68 20 61 |.dim pic|tWidth a|
|000013d0| 73 20 69 6e 74 65 67 65 | 72 00 2f 27 67 65 74 74 |s intege|r./'gett|
|000013e0| 69 6e 67 20 77 69 64 74 | 68 20 6f 66 20 70 69 63 |ing widt|h of pic|
|000013f0| 74 75 72 65 20 6f 6e 6c | 79 20 6f 6e 63 65 20 66 |ture onl|y once f|
|00001400| 6f 72 20 73 70 65 65 64 | 21 3f 1c 70 69 63 74 57 |or speed|!?.pictW|
|00001410| 69 64 74 68 20 3d 20 70 | 69 63 74 4e 6f 72 6d 61 |idth = p|ictNorma|
|00001420| 6c 2e 77 69 64 74 68 00 | 17 69 66 20 70 69 63 74 |l.width.|.if pict|
|00001430| 57 69 64 74 68 20 3c 3d | 20 31 36 20 74 68 65 6e |Width <=| 16 then|
|00001440| 37 27 73 70 61 63 65 72 | 73 20 3d 20 32 20 66 6f |7'spacer|s = 2 fo|
|00001450| 72 20 6c 65 66 74 20 65 | 64 67 65 2c 20 34 20 66 |r left e|dge, 4 f|
|00001460| 6f 72 20 62 65 74 77 65 | 65 6e 20 69 63 6f 6e 20 |or betwe|en icon |
|00001470| 61 6e 64 20 74 65 78 74 | 33 27 69 66 20 70 69 63 |and text|3'if pic|
|00001480| 74 75 72 65 20 69 73 20 | 31 36 78 31 36 20 69 63 |ture is |16x16 ic|
|00001490| 6f 6e 2c 20 72 65 74 75 | 72 6e 69 6e 67 20 31 36 |on, retu|rning 16|
|000014a0| 20 61 6e 64 20 73 70 61 | 63 65 72 73 09 72 65 74 | and spa|cers.ret|
|000014b0| 75 72 6e 20 32 32 00 2e | 65 6c 73 65 69 66 20 31 |urn 22..|elseif 1|
|000014c0| 36 20 3c 20 70 69 63 74 | 57 69 64 74 68 20 61 6e |6 < pict|Width an|
|000014d0| 64 20 70 69 63 74 57 69 | 64 74 68 20 3c 3d 20 33 |d pictWi|dth <= 3|
|000014e0| 32 20 74 68 65 6e 33 27 | 69 66 20 70 69 63 74 75 |2 then3'|if pictu|
|000014f0| 72 65 20 69 73 20 33 32 | 78 33 32 20 69 63 6f 6e |re is 32|x32 icon|
|00001500| 2c 20 72 65 74 75 72 6e | 69 6e 67 20 33 32 20 61 |, return|ing 32 a|
|00001510| 6e 64 20 73 70 61 63 65 | 72 73 09 72 65 74 75 72 |nd space|rs.retur|
|00001520| 6e 20 33 38 00 04 65 6c | 73 65 3c 27 62 69 67 67 |n 38..el|se<'bigg|
|00001530| 65 72 20 74 68 65 6e 20 | 33 32 78 33 32 20 69 63 |er then |32x32 ic|
|00001540| 6f 6e 2c 20 72 65 74 75 | 72 6e 69 6e 67 20 70 69 |on, retu|rning pi|
|00001550| 63 74 75 72 65 2e 77 69 | 64 74 68 20 61 6e 64 20 |cture.wi|dth and |
|00001560| 73 70 61 63 65 72 73 14 | 72 65 74 75 72 6e 20 70 |spacers.|return p|
|00001570| 69 63 74 57 69 64 74 68 | 20 2b 20 36 06 65 6e 64 |ictWidth| + 6.end|
|00001580| 20 69 66 00 13 65 78 63 | 65 70 74 69 6f 6e 20 6e | if..exc|eption n|
|00001590| 69 6c 4f 62 6a 65 63 74 | 31 6d 73 67 42 6f 78 20 |ilObject|1msgBox |
|000015a0| 22 49 6e 76 61 6c 69 64 | 20 52 65 73 49 63 6f 6e |"Invalid| ResIcon|
|000015b0| 49 44 20 69 6e 20 4d 53 | 42 75 74 74 6f 6e 2c 20 |ID in MS|Button, |
|000015c0| 71 75 69 74 74 69 6e 67 | 2e 22 04 71 75 69 74 0c |quitting|.".quit.|
|000015d0| 45 6e 64 20 46 75 6e 63 | 74 69 6f 6e 09 73 65 74 |End Func|tion.set|
|000015e0| 43 6f 6c 6f 72 73 00 00 | 00 0c 06 0c 06 36 0f 53 |Colors..|.....6.S|
|000015f0| 75 62 20 73 65 74 43 6f | 6c 6f 72 73 28 29 14 64 |ub setCo|lors().d|
|00001600| 69 6d 20 72 20 61 73 20 | 6d 65 6d 6f 72 79 42 6c |im r as |memoryBl|
|00001610| 6f 63 6b 20 64 69 6d 20 | 69 2c 20 64 65 70 74 68 |ock dim |i, depth|
|00001620| 2c 20 76 65 72 73 69 6f | 6e 20 61 73 20 69 6e 74 |, versio|n as int|
|00001630| 65 67 65 72 00 27 69 66 | 20 73 79 73 74 65 6d 2e |eger.'if| system.|
|00001640| 67 65 73 74 61 6c 74 28 | 22 73 79 73 76 22 2c 20 |gestalt(|"sysv", |
|00001650| 76 65 72 73 69 6f 6e 29 | 20 74 68 65 6e 00 16 69 |version)| then..i|
|00001660| 66 20 76 65 72 73 69 6f | 6e 20 3c 20 32 31 32 38 |f versio|n < 2128|
|00001670| 20 74 68 65 6e 10 53 74 | 61 6e 64 61 72 64 43 6f | then.St|andardCo|
|00001680| 6c 6f 72 73 28 29 06 72 | 65 74 75 72 6e 06 65 6e |lors().r|eturn.en|
|00001690| 64 20 69 66 04 65 6c 73 | 65 10 53 74 61 6e 64 61 |d if.els|e.Standa|
|000016a0| 72 64 43 6f 6c 6f 72 73 | 28 29 06 72 65 74 75 72 |rdColors|().retur|
|000016b0| 6e 87 01 65 6e 64 20 69 | 66 20 27 63 68 65 63 6b |n..end i|f 'check|
|000016c0| 20 69 66 20 72 75 6e 6e | 69 6e 67 20 38 2e 35 20 | if runn|ing 8.5 |
|000016d0| 6f 72 20 67 72 65 61 74 | 65 72 2c 20 69 66 20 6e |or great|er, if n|
|000016e0| 6f 74 2c 20 64 72 61 77 | 69 6e 67 20 6e 6f 72 6d |ot, draw|ing norm|
|000016f0| 61 6c 20 62 75 74 74 6f | 6e 73 00 03 20 20 20 95 |al butto|ns.. .|
|00001700| 02 44 65 63 6c 61 72 65 | 20 46 75 6e 63 74 69 6f |.Declare| Functio|
|00001710| 6e 20 47 65 74 54 68 65 | 6d 65 42 72 75 73 68 41 |n GetThe|meBrushA|
|00001720| 73 43 6f 6c 6f 72 20 4c | 69 62 20 22 41 70 70 65 |sColor L|ib "Appe|
|00001730| 61 72 61 6e 63 65 4c 69 | 62 22 20 28 69 6e 42 72 |aranceLi|b" (inBr|
|00001740| 75 73 68 20 61 73 20 49 | 6e 74 65 67 65 72 2c 20 |ush as I|nteger, |
|00001750| 69 6e 44 65 70 74 68 20 | 61 73 20 49 6e 74 65 67 |inDepth |as Integ|
|00001760| 65 72 2c 20 69 6e 43 6f | 6c 6f 72 44 65 76 20 61 |er, inCo|lorDev a|
|00001770| 73 20 49 6e 74 65 67 65 | 72 2c 20 6f 75 74 43 6f |s Intege|r, outCo|
|00001780| 6c 6f 72 20 61 73 20 50 | 74 72 29 20 61 73 20 49 |lor as P|tr) as I|
|00001790| 6e 74 65 67 65 72 92 02 | 44 65 63 6c 61 72 65 20 |nteger..|Declare |
|000017a0| 46 75 6e 63 74 69 6f 6e | 20 47 65 74 54 68 65 6d |Function| GetThem|
|000017b0| 65 54 65 78 74 43 6f 6c | 6f 72 20 4c 69 62 20 22 |eTextCol|or Lib "|
|000017c0| 41 70 70 65 61 72 61 6e | 63 65 4c 69 62 22 20 28 |Appearan|ceLib" (|
|000017d0| 69 6e 43 6f 6c 6f 72 20 | 61 73 20 49 6e 74 65 67 |inColor |as Integ|
|000017e0| 65 72 2c 20 69 6e 44 65 | 70 74 68 20 61 73 20 49 |er, inDe|pth as I|
|000017f0| 6e 74 65 67 65 72 2c 20 | 69 6e 43 6f 6c 6f 72 44 |nteger, |inColorD|
|00001800| 65 76 20 61 73 20 49 6e | 74 65 67 65 72 2c 20 6f |ev as In|teger, o|
|00001810| 75 74 43 6f 6c 6f 72 20 | 61 73 20 50 74 72 29 20 |utColor |as Ptr) |
|00001820| 61 73 20 49 6e 74 65 67 | 65 72 00 15 72 20 3d 20 |as Integ|er..r = |
|00001830| 6e 65 77 4d 65 6d 6f 72 | 79 42 6c 6f 63 6b 28 39 |newMemor|yBlock(9|
|00001840| 29 17 64 65 70 74 68 20 | 3d 20 73 63 72 65 65 6e |).depth |= screen|
|00001850| 28 30 29 2e 64 65 70 74 | 68 00 18 27 67 65 74 74 |(0).dept|h..'gett|
|00001860| 69 6e 67 20 62 65 76 65 | 6c 20 63 6f 6c 6f 72 73 |ing beve|l colors|
|00001870| 20 20 20 29 69 20 3d 20 | 47 65 74 54 68 65 6d 65 | )i = |GetTheme|
|00001880| 42 72 75 73 68 41 73 43 | 6f 6c 6f 72 28 34 34 2c |BrushAsC|olor(44,|
|00001890| 20 64 65 70 74 68 2c 20 | 31 2c 20 72 29 31 6c 69 | depth, |1, r)1li|
|000018a0| 67 68 74 42 65 76 65 6c | 20 3d 20 72 67 62 28 72 |ghtBevel| = rgb(r|
|000018b0| 2e 62 79 74 65 28 30 29 | 2c 20 72 2e 62 79 74 65 |.byte(0)|, r.byte|
|000018c0| 28 32 29 2c 20 72 2e 62 | 79 74 65 28 34 29 29 00 |(2), r.b|yte(4)).|
|000018d0| 2c 69 20 3d 20 47 65 74 | 54 68 65 6d 65 42 72 75 |,i = Get|ThemeBru|
|000018e0| 73 68 41 73 43 6f 6c 6f | 72 28 34 35 2c 20 64 65 |shAsColo|r(45, de|
|000018f0| 70 74 68 2c 20 31 2c 20 | 72 29 20 20 20 30 64 61 |pth, 1, |r) 0da|
|00001900| 72 6b 42 65 76 65 6c 20 | 3d 20 72 67 62 28 72 2e |rkBevel |= rgb(r.|
|00001910| 62 79 74 65 28 30 29 2c | 20 72 2e 62 79 74 65 28 |byte(0),| r.byte(|
|00001920| 32 29 2c 20 72 2e 62 79 | 74 65 28 34 29 29 00 1a |2), r.by|te(4))..|
|00001930| 27 67 65 74 74 69 6e 67 | 20 61 63 74 69 76 65 20 |'getting| active |
|00001940| 74 65 78 74 20 63 6f 6c | 6f 72 26 69 20 3d 20 47 |text col|or&i = G|
|00001950| 65 74 54 68 65 6d 65 54 | 65 78 74 43 6f 6c 6f 72 |etThemeT|extColor|
|00001960| 28 31 32 2c 20 64 65 70 | 74 68 2c 20 31 2c 20 72 |(12, dep|th, 1, r|
|00001970| 29 30 74 65 78 74 41 63 | 74 69 76 65 20 3d 72 67 |)0textAc|tive =rg|
|00001980| 62 28 72 2e 62 79 74 65 | 28 30 29 2c 20 72 2e 62 |b(r.byte|(0), r.b|
|00001990| 79 74 65 28 32 29 2c 20 | 72 2e 62 79 74 65 28 34 |yte(2), |r.byte(4|
|000019a0| 29 29 00 1c 27 67 65 74 | 74 69 6e 67 20 64 69 73 |))..'get|ting dis|
|000019b0| 61 62 6c 65 64 20 63 6f | 6c 6f 72 20 74 65 78 74 |abled co|lor text|
|000019c0| 26 69 20 3d 20 47 65 74 | 54 68 65 6d 65 54 65 78 |&i = Get|ThemeTex|
|000019d0| 74 43 6f 6c 6f 72 28 31 | 33 2c 20 64 65 70 74 68 |tColor(1|3, depth|
|000019e0| 2c 20 31 2c 20 72 29 33 | 74 65 78 74 44 69 73 61 |, 1, r)3|textDisa|
|000019f0| 62 6c 65 64 20 3d 20 72 | 67 62 28 72 2e 62 79 74 |bled = r|gb(r.byt|
|00001a00| 65 28 30 29 2c 20 72 2e | 62 79 74 65 28 32 29 2c |e(0), r.|byte(2),|
|00001a10| 20 72 2e 62 79 74 65 28 | 34 29 29 00 19 27 67 65 | r.byte(|4))..'ge|
|00001a20| 74 74 69 6e 67 20 62 61 | 63 6b 67 72 6f 75 6e 64 |tting ba|ckground|
|00001a30| 20 63 6f 6c 6f 72 28 69 | 20 3d 20 47 65 74 54 68 | color(i| = GetTh|
|00001a40| 65 6d 65 42 72 75 73 68 | 41 73 43 6f 6c 6f 72 28 |emeBrush|AsColor(|
|00001a50| 31 2c 20 64 65 70 74 68 | 2c 20 31 2c 20 72 29 30 |1, depth|, 1, r)0|
|00001a60| 42 61 63 6b 43 6f 6c 6f | 72 20 3d 20 72 67 62 28 |BackColo|r = rgb(|
|00001a70| 72 2e 62 79 74 65 28 30 | 29 2c 20 72 2e 62 79 74 |r.byte(0|), r.byt|
|00001a80| 65 28 32 29 2c 20 72 2e | 62 79 74 65 28 34 29 29 |e(2), r.|byte(4))|
|00001a90| 00 22 27 67 65 74 74 69 | 6e 67 20 64 69 73 61 62 |."'getti|ng disab|
|00001aa0| 6c 65 64 20 62 61 63 6b | 67 72 6f 75 6e 64 20 63 |led back|ground c|
|00001ab0| 6f 6c 6f 72 28 69 20 3d | 20 47 65 74 54 68 65 6d |olor(i =| GetThem|
|00001ac0| 65 42 72 75 73 68 41 73 | 43 6f 6c 6f 72 28 32 2c |eBrushAs|Color(2,|
|00001ad0| 20 64 65 70 74 68 2c 20 | 31 2c 20 72 29 38 42 61 | depth, |1, r)8Ba|
|00001ae0| 63 6b 43 6f 6c 6f 72 44 | 69 73 61 62 6c 65 64 20 |ckColorD|isabled |
|00001af0| 3d 20 72 67 62 28 72 2e | 62 79 74 65 28 30 29 2c |= rgb(r.|byte(0),|
|00001b00| 20 72 2e 62 79 74 65 28 | 32 29 2c 20 72 2e 62 79 | r.byte(|2), r.by|
|00001b10| 74 65 28 34 29 29 00 0e | 69 66 20 69 20 3c 3e 20 |te(4))..|if i <> |
|00001b20| 30 20 74 68 65 6e 87 01 | 6d 73 67 42 6f 78 20 22 |0 then..|msgBox "|
|00001b30| 45 72 72 6f 72 20 69 6e | 20 4e 69 6c 4f 62 6a 65 |Error in| NilObje|
|00001b40| 63 74 20 4d 53 43 61 6e | 76 61 73 57 69 74 68 50 |ct MSCan|vasWithP|
|00001b50| 69 63 20 63 6c 61 73 73 | 20 77 68 69 6c 65 20 67 |ic class| while g|
|00001b60| 65 74 74 69 6e 67 20 63 | 6f 6c 6f 72 73 2e 22 04 |etting c|olors.".|
|00001b70| 71 75 69 74 06 65 6e 64 | 20 69 66 00 13 65 78 63 |quit.end| if..exc|
|00001b80| 65 70 74 69 6f 6e 20 6e | 69 6c 4f 62 6a 65 63 74 |eption n|ilObject|
|00001b90| 87 01 6d 73 67 42 6f 78 | 20 22 45 72 72 6f 72 20 |..msgBox| "Error |
|00001ba0| 69 6e 20 4e 69 6c 4f 62 | 6a 65 63 74 20 4d 53 43 |in NilOb|ject MSC|
|00001bb0| 61 6e 76 61 73 57 69 74 | 68 50 69 63 20 63 6c 61 |anvasWit|hPic cla|
|00001bc0| 73 73 20 77 68 69 6c 65 | 20 67 65 74 74 69 6e 67 |ss while| getting|
|00001bd0| 20 63 6f 6c 6f 72 73 2e | 22 04 71 75 69 74 07 45 | colors.|".quit.E|
|00001be0| 6e 64 20 53 75 62 0e 73 | 74 61 6e 64 61 72 64 43 |nd Sub.s|tandardC|
|00001bf0| 6f 6c 6f 72 73 00 00 00 | 06 0c 06 0c 0b 14 53 75 |olors...|......Su|
|00001c00| 62 20 73 74 61 6e 64 61 | 72 64 43 6f 6c 6f 72 73 |b standa|rdColors|
|00001c10| 28 29 3d 27 73 65 74 74 | 69 6e 67 20 76 61 72 73 |()='sett|ing vars|
|00001c20| 20 74 6f 20 73 74 61 6e | 64 61 72 64 20 63 6f 6c | to stan|dard col|
|00001c30| 6f 72 73 20 69 66 20 6e | 6f 74 20 72 75 6e 6e 69 |ors if n|ot runni|
|00001c40| 6e 67 20 38 2e 35 20 6f | 72 20 68 69 67 68 65 72 |ng 8.5 o|r higher|
|00001c50| 00 1d 6c 69 67 68 74 42 | 65 76 65 6c 20 3d 20 72 |..lightB|evel = r|
|00001c60| 67 62 28 32 35 36 2c 32 | 35 36 2c 32 35 36 29 1c |gb(256,2|56,256).|
|00001c70| 64 61 72 6b 42 65 76 65 | 6c 20 3d 20 72 67 62 28 |darkBeve|l = rgb(|
|00001c80| 31 33 36 2c 31 33 36 2c | 31 33 36 29 16 74 65 78 |136,136,|136).tex|
|00001c90| 74 41 63 74 69 76 65 20 | 3d 20 74 65 78 74 43 6f |tActive |= textCo|
|00001ca0| 6c 6f 72 21 74 65 78 74 | 44 69 73 61 62 6c 65 64 |lor!text|Disabled|
|00001cb0| 20 3d 20 72 67 62 28 31 | 31 35 2c 20 31 31 35 2c | = rgb(1|15, 115,|
|00001cc0| 20 31 31 35 29 15 42 61 | 63 6b 43 6f 6c 6f 72 20 | 115).Ba|ckColor |
|00001cd0| 3d 20 66 69 6c 6c 43 6f | 6c 6f 72 1d 42 61 63 6b |= fillCo|lor.Back|
|00001ce0| 43 6f 6c 6f 72 44 69 73 | 61 62 6c 65 64 20 3d 20 |ColorDis|abled = |
|00001cf0| 66 69 6c 6c 43 6f 6c 6f | 72 00 07 45 6e 64 20 53 |fillColo|r..End S|
|00001d00| 75 62 08 64 72 61 77 49 | 63 6f 6e 00 00 00 13 2f |ub.drawI|con..../|
|00001d10| 13 2f 17 0e 53 75 62 20 | 64 72 61 77 49 63 6f 6e |./..Sub |drawIcon|
|00001d20| 28 29 1c 64 69 6d 20 77 | 69 64 74 68 2c 20 68 65 |().dim w|idth, he|
|00001d30| 69 67 68 74 20 61 73 20 | 69 6e 74 65 67 65 72 00 |ight as |integer.|
|00001d40| 1b 77 69 64 74 68 20 3d | 20 6d 65 2e 70 69 63 74 |.width =| me.pict|
|00001d50| 4e 6f 72 6d 61 6c 2e 77 | 69 64 74 68 1d 68 65 69 |Normal.w|idth.hei|
|00001d60| 67 68 74 20 3d 20 6d 65 | 2e 70 69 63 74 4e 6f 72 |ght = me|.pictNor|
|00001d70| 6d 61 6c 2e 68 65 69 67 | 68 74 00 0e 27 64 72 61 |mal.heig|ht..'dra|
|00001d80| 77 69 6e 67 20 69 63 6f | 6e 73 19 69 66 20 6d 65 |wing ico|ns.if me|
|00001d90| 2e 65 6e 61 62 6c 65 64 | 20 3d 20 74 72 75 65 20 |.enabled| = true |
|00001da0| 74 68 65 6e 00 24 69 66 | 20 6d 65 2e 73 74 61 74 |then.$if| me.stat|
|00001db0| 65 20 3d 20 30 20 6f 72 | 20 6d 65 2e 73 74 61 74 |e = 0 or| me.stat|
|00001dc0| 65 20 3d 20 31 20 74 68 | 65 6e 14 27 75 70 20 61 |e = 1 th|en.'up a|
|00001dd0| 6e 64 20 6e 6f 72 6d 61 | 6c 20 73 74 61 74 65 39 |nd norma|l state9|
|00001de0| 50 44 72 61 77 43 49 43 | 4e 28 52 65 73 49 63 6f |PDrawCIC|N(ResIco|
|00001df0| 6e 49 44 2c 20 33 2c 20 | 67 65 74 50 69 63 74 59 |nID, 3, |getPictY|
|00001e00| 2c 77 69 64 74 68 2c 20 | 68 65 69 67 68 74 2c 20 |,width, |height, |
|00001e10| 30 2c 20 66 61 6c 73 65 | 29 04 65 6c 73 65 0b 27 |0, false|).else.'|
|00001e20| 64 6f 77 6e 20 73 74 61 | 74 65 3c 50 44 72 61 77 |down sta|te<PDraw|
|00001e30| 43 49 43 4e 28 52 65 73 | 49 63 6f 6e 49 44 2c 20 |CICN(Res|IconID, |
|00001e40| 35 2c 20 67 65 74 50 69 | 63 74 59 2b 20 32 2c 20 |5, getPi|ctY+ 2, |
|00001e50| 77 69 64 74 68 2c 20 68 | 65 69 67 68 74 2c 20 30 |width, h|eight, 0|
|00001e60| 2c 20 74 72 75 65 29 06 | 65 6e 64 20 69 66 00 04 |, true).|end if..|
|00001e70| 65 6c 73 65 0f 27 64 69 | 73 61 62 6c 65 64 20 73 |else.'di|sabled s|
|00001e80| 74 61 74 65 3a 50 44 72 | 61 77 43 49 43 4e 28 52 |tate:PDr|awCICN(R|
|00001e90| 65 73 49 63 6f 6e 49 44 | 2c 20 33 2c 20 67 65 74 |esIconID|, 3, get|
|00001ea0| 50 69 63 74 59 2c 20 77 | 69 64 74 68 2c 20 68 65 |PictY, w|idth, he|
|00001eb0| 69 67 68 74 2c 20 31 2c | 20 66 61 6c 73 65 29 06 |ight, 1,| false).|
|00001ec0| 65 6e 64 20 69 66 00 07 | 45 6e 64 20 53 75 62 09 |end if..|End Sub.|
|00001ed0| 50 44 72 61 77 43 49 43 | 4e b9 01 69 64 20 61 73 |PDrawCIC|N..id as|
|00001ee0| 20 69 6e 74 65 67 65 72 | 2c 20 6c 65 66 74 20 61 | integer|, left a|
|00001ef0| 73 20 69 6e 74 65 67 65 | 72 2c 20 74 6f 70 20 61 |s intege|r, top a|
|00001f00| 73 20 69 6e 74 65 67 65 | 72 2c 20 77 69 64 74 68 |s intege|r, width|
|00001f10| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 68 65 69 | as inte|ger, hei|
|00001f20| 67 68 74 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |ght as i|nteger, |
|00001f30| 6d 6f 64 65 20 61 73 20 | 69 6e 74 65 67 65 72 2c |mode as |integer,|
|00001f40| 20 73 65 6c 65 63 74 65 | 64 20 61 73 20 62 6f 6f | selecte|d as boo|
|00001f50| 6c 65 61 6e 00 00 21 0d | 21 0d 38 88 02 53 75 62 |lean..!.|!.8..Sub|
|00001f60| 20 50 44 72 61 77 43 49 | 43 4e 28 69 64 20 61 73 | PDrawCI|CN(id as|
|00001f70| 20 69 6e 74 65 67 65 72 | 2c 20 6c 65 66 74 20 61 | integer|, left a|
|00001f80| 73 20 69 6e 74 65 67 65 | 72 2c 20 74 6f 70 20 61 |s intege|r, top a|
|00001f90| 73 20 69 6e 74 65 67 65 | 72 2c 20 77 69 64 74 68 |s intege|r, width|
|00001fa0| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 68 65 69 | as inte|ger, hei|
|00001fb0| 67 68 74 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |ght as i|nteger, |
|00001fc0| 6d 6f 64 65 20 61 73 20 | 69 6e 74 65 67 65 72 2c |mode as |integer,|
|00001fd0| 20 73 65 6c 65 63 74 65 | 64 20 61 73 20 62 6f 6f | selecte|d as boo|
|00001fe0| 6c 65 61 6e 29 00 93 01 | 64 65 63 6c 61 72 65 20 |lean)...|declare |
|00001ff0| 66 75 6e 63 74 69 6f 6e | 20 47 65 74 43 49 63 6f |function| GetCIco|
|00002000| 6e 20 6c 69 62 20 22 49 | 6e 74 65 72 66 61 63 65 |n lib "I|nterface|
|00002010| 4c 69 62 22 20 28 69 64 | 20 61 73 20 73 68 6f 72 |Lib" (id| as shor|
|00002020| 74 29 20 61 73 20 70 74 | 72 20 49 6e 6c 69 6e 65 |t) as pt|r Inline|
|00002030| 36 38 4b 28 22 41 41 31 | 45 22 29 97 02 64 65 63 |68K("AA1|E")..dec|
|00002040| 6c 61 72 65 20 66 75 6e | 63 74 69 6f 6e 20 50 6c |lare fun|ction Pl|
|00002050| 6f 74 43 49 63 6f 6e 48 | 61 6e 64 6c 65 20 6c 69 |otCIconH|andle li|
|00002060| 62 20 22 49 6e 74 65 72 | 66 61 63 65 4c 69 62 22 |b "Inter|faceLib"|
|00002070| 20 28 72 65 63 74 20 61 | 73 20 70 74 72 2c 20 61 | (rect a|s ptr, a|
|00002080| 6c 69 67 6e 20 61 73 20 | 73 68 6f 72 74 2c 20 74 |lign as |short, t|
|00002090| 72 61 6e 73 66 6f 72 6d | 20 61 73 20 73 68 6f 72 |ransform| as shor|
|000020a0| 74 2c 20 69 63 6f 6e 20 | 61 73 20 70 74 72 29 20 |t, icon |as ptr) |
|000020b0| 61 73 20 69 6e 74 65 67 | 65 72 20 49 6e 6c 69 6e |as integ|er Inlin|
|000020c0| 65 36 38 4b 28 22 33 30 | 33 43 30 36 31 46 41 42 |e68K("30|3C061FAB|
|000020d0| 43 39 22 29 8d 01 64 65 | 63 6c 61 72 65 20 73 75 |C9")..de|clare su|
|000020e0| 62 20 44 69 73 70 6f 73 | 65 43 49 63 6f 6e 20 6c |b Dispos|eCIcon l|
|000020f0| 69 62 20 22 49 6e 74 65 | 72 66 61 63 65 4c 69 62 |ib "Inte|rfaceLib|
|00002100| 22 20 28 68 61 6e 64 6c | 65 20 61 73 20 70 74 72 |" (handl|e as ptr|
|00002110| 29 20 49 6e 6c 69 6e 65 | 36 38 4b 28 22 41 41 32 |) Inline|68K("AA2|
|00002120| 35 22 29 00 20 64 69 6d | 20 68 61 6e 64 6c 65 2c |5"). dim| handle,|
|00002130| 6e 69 6c 70 74 72 20 61 | 73 20 4d 65 6d 6f 72 79 |nilptr a|s Memory|
|00002140| 42 6c 6f 63 6b 1c 64 69 | 6d 20 74 72 61 6e 73 66 |Block.di|m transf|
|00002150| 6f 72 6d 2c 65 72 72 20 | 61 73 20 69 6e 74 65 67 |orm,err |as integ|
|00002160| 65 72 17 64 69 6d 20 72 | 65 63 74 20 61 73 20 4d |er.dim r|ect as M|
|00002170| 65 6d 6f 72 79 42 6c 6f | 63 6b 00 1a 6e 69 6c 70 |emoryBlo|ck..nilp|
|00002180| 74 72 20 3d 20 4e 65 77 | 4d 65 6d 6f 72 79 42 6c |tr = New|MemoryBl|
|00002190| 6f 63 6b 28 34 29 15 68 | 61 6e 64 6c 65 20 3d 20 |ock(4).h|andle = |
|000021a0| 47 65 74 43 49 63 6f 6e | 28 69 64 29 00 20 69 66 |GetCIcon|(id). if|
|000021b0| 20 28 68 61 6e 64 6c 65 | 20 3d 20 6e 69 6c 70 74 | (handle| = nilpt|
|000021c0| 72 2e 70 74 72 28 30 29 | 29 20 74 68 65 6e 06 72 |r.ptr(0)|) then.r|
|000021d0| 65 74 75 72 6e 06 65 6e | 64 20 69 66 00 18 72 65 |eturn.en|d if..re|
|000021e0| 63 74 20 3d 20 4e 65 77 | 4d 65 6d 6f 72 79 42 6c |ct = New|MemoryBl|
|000021f0| 6f 63 6b 28 38 29 13 72 | 65 63 74 2e 73 68 6f 72 |ock(8).r|ect.shor|
|00002200| 74 28 30 29 20 3d 20 74 | 6f 70 14 72 65 63 74 2e |t(0) = t|op.rect.|
|00002210| 73 68 6f 72 74 28 32 29 | 20 3d 20 6c 65 66 74 1c |short(2)| = left.|
|00002220| 72 65 63 74 2e 73 68 6f | 72 74 28 34 29 20 3d 20 |rect.sho|rt(4) = |
|00002230| 74 6f 70 20 2b 20 68 65 | 69 67 68 74 1c 72 65 63 |top + he|ight.rec|
|00002240| 74 2e 73 68 6f 72 74 28 | 36 29 20 3d 20 6c 65 66 |t.short(|6) = lef|
|00002250| 74 20 2b 20 77 69 64 74 | 68 00 1d 74 72 61 6e 73 |t + widt|h..trans|
|00002260| 66 6f 72 6d 3d 56 61 6c | 28 22 26 68 22 2b 53 74 |form=Val|("&h"+St|
|00002270| 72 28 6d 6f 64 65 29 29 | 00 10 69 66 20 73 65 6c |r(mode))|..if sel|
|00002280| 65 63 74 65 64 20 74 68 | 65 6e 1e 74 72 61 6e 73 |ected th|en.trans|
|00002290| 66 6f 72 6d 20 3d 20 74 | 72 61 6e 73 66 6f 72 6d |form = t|ransform|
|000022a0| 20 2b 20 26 68 34 30 30 | 30 06 65 6e 64 20 69 66 | + &h400|0.end if|
|000022b0| 00 17 2f 2f 20 56 61 6c | 69 64 20 22 6d 6f 64 65 |..// Val|id "mode|
|000022c0| 22 20 76 61 6c 75 65 73 | 3a 10 2f 2f 20 20 20 30 |" values|:.// 0|
|000022d0| 20 3d 20 65 6e 61 62 6c | 65 64 11 2f 2f 20 20 20 | = enabl|ed.// |
|000022e0| 31 20 3d 20 64 69 73 61 | 62 6c 65 64 10 2f 2f 20 |1 = disa|bled.// |
|000022f0| 20 20 32 20 3d 20 6f 66 | 66 6c 69 6e 65 0d 2f 2f | 2 = of|fline.//|
|00002300| 20 20 20 33 20 3d 20 6f | 70 65 6e 14 2f 2f 20 20 | 3 = o|pen.// |
|00002310| 20 34 30 30 30 20 3d 20 | 73 65 6c 65 63 74 65 64 | 4000 = |selected|
|00002320| 1e 2f 2f 20 46 69 6e 64 | 65 72 20 4c 61 62 65 6c |.// Find|er Label|
|00002330| 20 22 6d 6f 64 65 22 20 | 76 61 6c 75 65 73 3a 12 | "mode" |values:.|
|00002340| 2f 2f 20 20 20 31 30 30 | 20 3d 20 6c 61 62 65 6c |// 100| = label|
|00002350| 20 31 12 2f 2f 20 20 20 | 32 30 30 20 3d 20 6c 61 | 1.// |200 = la|
|00002360| 62 65 6c 20 32 12 2f 2f | 20 20 20 33 30 30 20 3d |bel 2.//| 300 =|
|00002370| 20 6c 61 62 65 6c 20 33 | 12 2f 2f 20 20 20 34 30 | label 3|.// 40|
|00002380| 30 20 3d 20 6c 61 62 65 | 6c 20 34 12 2f 2f 20 20 |0 = labe|l 4.// |
|00002390| 20 35 30 30 20 3d 20 6c | 61 62 65 6c 20 35 12 2f | 500 = l|abel 5./|
|000023a0| 2f 20 20 20 36 30 30 20 | 3d 20 6c 61 62 65 6c 20 |/ 600 |= label |
|000023b0| 36 12 2f 2f 20 20 20 37 | 30 30 20 3d 20 6c 61 62 |6.// 7|00 = lab|
|000023c0| 65 6c 20 37 8a 01 2f 2f | 20 4e 6f 74 65 3a 20 79 |el 7..//| Note: y|
|000023d0| 6f 75 20 63 61 6e 20 61 | 64 64 20 74 68 65 73 65 |ou can a|dd these|
|000023e0| 20 76 61 6c 75 65 73 20 | 74 6f 67 65 74 68 65 72 | values |together|
|000023f0| 20 74 6f 20 63 6f 6d 62 | 69 6e 65 20 73 74 61 74 | to comb|ine stat|
|00002400| 65 73 2c 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 3a |es, for |example:|
|00002410| 26 2f 2f 20 20 20 34 31 | 30 32 20 3d 20 73 65 6c |&// 41|02 = sel|
|00002420| 65 63 74 65 64 2c 20 6c | 61 62 65 6c 20 31 2c 20 |ected, l|abel 1, |
|00002430| 6f 66 66 6c 69 6e 65 18 | 2f 2f 20 20 20 33 30 33 |offline.|// 303|
|00002440| 20 3d 20 6f 70 65 6e 2c | 20 6c 61 62 65 6c 20 33 | = open,| label 3|
|00002450| ac 01 2f 2f 20 4e 6f 74 | 65 20 32 3a 20 6c 61 62 |..// Not|e 2: lab|
|00002460| 65 6c 73 20 61 72 65 20 | 69 6e 20 72 65 76 65 72 |els are |in rever|
|00002470| 73 65 20 6f 72 64 65 72 | 2c 20 69 2e 65 2e 20 31 |se order|, i.e. 1|
|00002480| 30 30 20 28 6c 61 62 65 | 6c 20 31 29 20 69 73 20 |00 (labe|l 1) is |
|00002490| 74 68 65 20 6c 61 73 74 | 20 6c 61 62 65 6c 20 69 |the last| label i|
|000024a0| 6e 20 74 68 65 20 46 69 | 6e 64 65 72 27 73 20 22 |n the Fi|nder's "|
|000024b0| 4c 61 62 65 6c 22 20 73 | 75 62 6d 65 6e 75 8c 01 |Label" s|ubmenu..|
|000024c0| 2f 2f 20 4e 6f 74 65 20 | 33 3a 20 65 69 74 68 65 |// Note |3: eithe|
|000024d0| 72 20 70 61 73 73 20 74 | 72 75 65 20 66 6f 72 20 |r pass t|rue for |
|000024e0| 73 65 6c 65 63 74 65 64 | 20 6f 72 20 61 64 64 20 |selected| or add |
|000024f0| 34 30 30 30 20 74 6f 20 | 6d 6f 64 65 2e 20 44 6f |4000 to |mode. Do|
|00002500| 6e 27 74 20 64 6f 20 62 | 6f 74 68 2e 00 31 65 72 |n't do b|oth..1er|
|00002510| 72 20 3d 20 50 6c 6f 74 | 43 49 63 6f 6e 48 61 6e |r = Plot|CIconHan|
|00002520| 64 6c 65 28 72 65 63 74 | 2c 20 30 2c 20 74 72 61 |dle(rect|, 0, tra|
|00002530| 6e 73 66 6f 72 6d 2c 20 | 68 61 6e 64 6c 65 29 13 |nsform, |handle).|
|00002540| 44 69 73 70 6f 73 65 43 | 49 63 6f 6e 20 68 61 6e |DisposeC|Icon han|
|00002550| 64 6c 65 00 10 69 66 20 | 65 72 72 20 3c 3e 20 30 |dle..if |err <> 0|
|00002560| 20 74 68 65 6e 2e 6d 73 | 67 42 6f 78 20 22 45 72 | then.ms|gBox "Er|
|00002570| 72 6f 72 20 64 72 61 77 | 69 6e 67 20 69 63 6f 6e |ror draw|ing icon|
|00002580| 20 69 6e 20 4d 53 42 75 | 74 74 6f 6e 20 43 6c 61 | in MSBu|tton Cla|
|00002590| 73 73 2e 22 06 65 6e 64 | 20 69 66 07 45 6e 64 20 |ss.".end| if.End |
|000025a0| 53 75 62 02 06 41 63 74 | 69 6f 6e 00 00 04 4f 70 |Sub..Act|ion...Op|
|000025b0| 65 6e 00 00 07 04 4f 70 | 65 6e 04 00 04 00 0a 0a |en....Op|en......|
|000025c0| 53 75 62 20 4f 70 65 6e | 28 29 14 64 69 6d 20 77 |Sub Open|().dim w|
|000025d0| 69 64 74 68 20 61 73 20 | 69 6e 74 65 67 65 72 00 |idth as |integer.|
|000025e0| 0b 73 65 74 43 6f 6c 6f | 72 73 28 29 00 06 4f 70 |.setColo|rs()..Op|
|000025f0| 65 6e 28 29 00 36 6d 65 | 2e 70 69 63 74 4e 6f 72 |en().6me|.pictNor|
|00002600| 6d 61 6c 20 3d 20 61 70 | 70 2e 72 65 73 6f 75 72 |mal = ap|p.resour|
|00002610| 63 65 46 6f 72 6b 2e 67 | 65 74 43 69 63 6e 28 6d |ceFork.g|etCicn(m|
|00002620| 65 2e 72 65 73 49 63 6f | 6e 49 44 29 00 07 45 6e |e.resIco|nID)..En|
|00002630| 64 20 53 75 62 07 4d 6f | 75 73 65 55 70 02 1a 02 |d Sub.Mo|useUp...|
|00002640| 1a 21 27 53 75 62 20 4d | 6f 75 73 65 55 70 28 58 |.!'Sub M|ouseUp(X|
|00002650| 20 41 73 20 49 6e 74 65 | 67 65 72 2c 20 59 20 41 | As Inte|ger, Y A|
|00002660| 73 20 49 6e 74 65 67 65 | 72 29 1e 69 66 20 58 20 |s Intege|r).if X |
|00002670| 3c 20 6d 65 2e 77 69 64 | 74 68 20 61 6e 64 20 58 |< me.wid|th and X|
|00002680| 20 3e 20 30 20 74 68 65 | 6e 1f 69 66 20 59 20 3c | > 0 the|n.if Y <|
|00002690| 20 6d 65 2e 68 65 69 67 | 68 74 20 61 6e 64 20 59 | me.heig|ht and Y|
|000026a0| 20 3e 20 30 20 74 68 65 | 6e 8b 01 27 69 66 20 69 | > 0 the|n..'if i|
|000026b0| 6e 73 69 64 65 20 74 68 | 65 20 62 75 74 74 6f 6e |nside th|e button|
|000026c0| 20 58 20 26 20 59 20 76 | 61 6c 75 65 73 20 77 68 | X & Y v|alues wh|
|000026d0| 65 6e 20 6d 6f 75 73 65 | 20 75 70 20 66 69 72 65 |en mouse| up fire|
|000026e0| 20 62 75 74 74 6f 6e 20 | 61 63 74 69 6f 6e 20 68 | button |action h|
|000026f0| 65 72 65 20 3d 29 00 8d | 01 27 44 65 70 65 6e 64 |ere =)..|.'Depend|
|00002700| 69 6e 67 20 6f 6e 20 74 | 68 65 20 61 63 74 69 6f |ing on t|he actio|
|00002710| 6e 20 79 6f 75 20 6d 61 | 79 20 4e 4f 54 20 6e 65 |n you ma|y NOT ne|
|00002720| 65 64 20 74 6f 20 73 77 | 69 74 63 68 20 74 68 65 |ed to sw|itch the|
|00002730| 20 61 70 70 20 63 75 72 | 73 6f 72 20 62 61 63 6b | app cur|sor back|
|00002740| 20 74 6f 20 61 20 0e 27 | 70 6f 69 6e 74 65 72 20 | to a .'|pointer |
|00002750| 68 65 72 65 2e 15 61 70 | 70 2e 6d 6f 75 73 65 43 |here..ap|p.mouseC|
|00002760| 75 72 73 6f 72 20 3d 20 | 6e 69 6c 14 27 66 69 72 |ursor = |nil.'fir|
|00002770| 69 6e 67 20 61 63 74 69 | 6f 6e 20 45 76 65 6e 74 |ing acti|on Event|
|00002780| 06 41 63 74 69 6f 6e 00 | 84 01 27 4d 6f 75 73 65 |.Action.|..'Mouse|
|00002790| 20 69 73 20 73 74 69 6c | 6c 20 6f 76 65 72 20 74 | is stil|l over t|
|000027a0| 68 65 20 62 75 74 74 6f | 6e 20 61 74 20 74 68 69 |he butto|n at thi|
|000027b0| 73 20 70 6f 69 6e 74 20 | 73 6f 20 66 69 72 69 6e |s point |so firin|
|000027c0| 67 20 74 68 65 20 75 70 | 20 73 74 61 74 65 09 27 |g the up| state.'|
|000027d0| 75 70 20 73 74 61 74 65 | 0c 6d 65 2e 73 74 61 74 |up state|.me.stat|
|000027e0| 65 20 3d 20 31 07 6d 65 | 2e 75 70 28 29 00 94 01 |e = 1.me|.up()...|
|000027f0| 27 53 65 74 74 69 6e 67 | 20 74 68 65 20 69 6e 44 |'Setting| the inD|
|00002800| 6f 77 6e 20 70 72 6f 70 | 65 72 74 79 20 74 6f 20 |own prop|erty to |
|00002810| 66 61 6c 73 65 20 62 65 | 63 61 75 73 65 20 74 68 |false be|cause th|
|00002820| 65 20 75 73 65 72 20 68 | 61 73 20 72 65 6c 65 61 |e user h|as relea|
|00002830| 73 65 64 20 74 68 65 20 | 6d 6f 75 73 65 20 62 75 |sed the |mouse bu|
|00002840| 74 74 6f 6e 11 6d 65 2e | 69 6e 44 6f 77 6e 20 3d |tton.me.|inDown =|
|00002850| 20 66 61 6c 73 65 06 72 | 65 74 75 72 6e 06 65 6e | false.r|eturn.en|
|00002860| 64 20 69 66 06 65 6e 64 | 20 69 66 00 0d 27 6e 6f |d if.end| if..'no|
|00002870| 72 6d 61 6c 20 73 74 61 | 74 65 0c 6d 65 2e 73 74 |rmal sta|te.me.st|
|00002880| 61 74 65 20 3d 20 30 0b | 6d 65 2e 6e 6f 72 6d 61 |ate = 0.|me.norma|
|00002890| 6c 28 29 00 94 01 27 53 | 65 74 74 69 6e 67 20 74 |l()...'S|etting t|
|000028a0| 68 65 20 69 6e 44 6f 77 | 6e 20 70 72 6f 70 65 72 |he inDow|n proper|
|000028b0| 74 79 20 74 6f 20 66 61 | 6c 73 65 20 62 65 63 61 |ty to fa|lse beca|
|000028c0| 75 73 65 20 74 68 65 20 | 75 73 65 72 20 68 61 73 |use the |user has|
|000028d0| 20 72 65 6c 65 61 73 65 | 64 20 74 68 65 20 6d 6f | release|d the mo|
|000028e0| 75 73 65 20 62 75 74 74 | 6f 6e 11 6d 65 2e 69 6e |use butt|on.me.in|
|000028f0| 44 6f 77 6e 20 3d 20 66 | 61 6c 73 65 00 27 27 73 |Down = f|alse.''s|
|00002900| 77 69 74 63 68 69 6e 67 | 20 74 68 65 20 63 75 72 |witching| the cur|
|00002910| 73 6f 72 20 62 61 63 6b | 20 74 6f 20 61 6e 20 61 |sor back| to an a|
|00002920| 72 72 6f 77 20 14 6d 65 | 2e 6d 6f 75 73 65 63 75 |rrow .me|.mousecu|
|00002930| 72 73 6f 72 20 3d 20 6e | 69 6c 00 07 45 6e 64 20 |rsor = n|il..End |
|00002940| 53 75 62 09 4d 6f 75 73 | 65 45 78 69 74 08 00 08 |Sub.Mous|eExit...|
|00002950| 00 0f 0f 53 75 62 20 4d | 6f 75 73 65 45 78 69 74 |...Sub M|ouseExit|
|00002960| 28 29 92 01 27 49 66 20 | 74 68 65 20 75 73 65 72 |()..'If |the user|
|00002970| 20 69 73 20 64 72 61 67 | 67 69 6e 67 20 6f 66 66 | is drag|ging off|
|00002980| 20 74 68 65 20 62 75 74 | 74 6f 6e 20 77 68 65 6e | the but|ton when|
|00002990| 20 74 68 65 79 20 65 78 | 69 74 20 69 74 20 74 68 | they ex|it it th|
|000029a0| 65 20 69 6e 44 6f 77 6e | 20 70 72 6f 70 65 72 74 |e inDown| propert|
|000029b0| 79 20 77 69 6c 6c 2d 27 | 62 65 20 74 72 75 65 2e |y will-'|be true.|
|000029c0| 20 20 46 69 72 65 73 20 | 74 68 65 20 75 70 20 73 | Fires |the up s|
|000029d0| 74 61 74 65 20 6f 66 20 | 74 68 65 20 62 75 74 74 |tate of |the butt|
|000029e0| 6f 6e 2e 20 2a 27 45 6c | 73 65 20 66 69 72 65 20 |on. *'El|se fire |
|000029f0| 74 68 65 20 6e 6f 72 6d | 61 6c 20 73 74 61 74 65 |the norm|al state|
|00002a00| 20 6f 66 20 74 68 65 20 | 62 75 74 74 6f 6e 2e 00 | of the |button..|
|00002a10| 19 69 66 20 6d 65 2e 69 | 6e 44 6f 77 6e 20 3d 20 |.if me.i|nDown = |
|00002a20| 66 61 6c 73 65 20 74 68 | 65 6e 0d 27 6e 6f 72 6d |false th|en.'norm|
|00002a30| 61 6c 20 73 74 61 74 65 | 0c 6d 65 2e 73 74 61 74 |al state|.me.stat|
|00002a40| 65 20 3d 20 30 0b 6d 65 | 2e 6e 6f 72 6d 61 6c 28 |e = 0.me|.normal(|
|00002a50| 29 04 65 6c 73 65 09 27 | 75 70 20 73 74 61 74 65 |).else.'|up state|
|00002a60| 0c 6d 65 2e 73 74 61 74 | 65 20 3d 20 31 07 6d 65 |.me.stat|e = 1.me|
|00002a70| 2e 75 70 28 29 06 65 6e | 64 20 69 66 07 45 6e 64 |.up().en|d if.End|
|00002a80| 20 53 75 62 0a 4d 6f 75 | 73 65 45 6e 74 65 72 0e | Sub.Mou|seEnter.|
|00002a90| 00 0e 00 10 10 53 75 62 | 20 4d 6f 75 73 65 45 6e |.....Sub| MouseEn|
|00002aa0| 74 65 72 28 29 8e 01 27 | 49 66 20 74 68 65 20 69 |ter()..'|If the i|
|00002ab0| 6e 44 6f 77 6e 20 50 72 | 6f 70 65 72 74 79 20 69 |nDown Pr|operty i|
|00002ac0| 73 20 74 72 75 65 20 61 | 6e 64 20 74 68 65 20 73 |s true a|nd the s|
|00002ad0| 79 73 74 65 6d 2e 6d 6f | 75 73 65 64 6f 77 6e 20 |ystem.mo|usedown |
|00002ae0| 69 73 20 74 72 75 65 2c | 20 74 68 65 20 75 73 65 |is true,| the use|
|00002af0| 72 20 69 73 20 90 01 27 | 65 6e 74 65 72 69 6e 67 |r is ..'|entering|
|00002b00| 20 74 68 65 20 62 75 74 | 74 6f 6e 20 61 66 74 65 | the but|ton afte|
|00002b10| 72 20 74 68 65 79 20 64 | 72 75 67 20 6f 66 66 20 |r they d|rug off |
|00002b20| 6f 66 20 74 68 65 20 62 | 75 74 74 6f 6e 2e 20 20 |of the b|utton. |
|00002b30| 54 68 69 73 20 66 69 72 | 65 73 20 74 68 65 20 73 |This fir|es the s|
|00002b40| 65 74 20 64 6f 77 6e 07 | 27 73 74 61 74 65 2e 2d |et down.|'state.-|
|00002b50| 27 45 6c 73 65 20 73 65 | 74 74 69 6e 67 20 74 68 |'Else se|tting th|
|00002b60| 65 20 74 68 65 20 62 75 | 74 74 6f 6e 20 74 6f 20 |e the bu|tton to |
|00002b70| 74 68 65 20 75 70 20 73 | 74 61 74 65 2e 34 69 66 |the up s|tate.4if|
|00002b80| 20 6d 65 2e 69 6e 44 6f | 77 6e 20 3d 20 74 72 75 | me.inDo|wn = tru|
|00002b90| 65 20 61 6e 64 20 73 79 | 73 74 65 6d 2e 6d 6f 75 |e and sy|stem.mou|
|00002ba0| 73 65 64 6f 77 6e 20 3d | 20 74 72 75 65 20 74 68 |sedown =| true th|
|00002bb0| 65 6e 0b 27 64 6f 77 6e | 20 73 74 61 74 65 0c 6d |en.'down| state.m|
|00002bc0| 65 2e 73 74 61 74 65 20 | 3d 20 32 09 6d 65 2e 64 |e.state |= 2.me.d|
|00002bd0| 6f 77 6e 28 29 04 65 6c | 73 65 03 27 75 70 0c 6d |own().el|se.'up.m|
|00002be0| 65 2e 73 74 61 74 65 20 | 3d 20 31 07 6d 65 2e 75 |e.state |= 1.me.u|
|00002bf0| 70 28 29 06 65 6e 64 20 | 69 66 00 07 45 6e 64 20 |p().end |if..End |
|00002c00| 53 75 62 09 4d 6f 75 73 | 65 44 72 61 67 03 1a 03 |Sub.Mous|eDrag...|
|00002c10| 1a 22 29 53 75 62 20 4d | 6f 75 73 65 44 72 61 67 |.")Sub M|ouseDrag|
|00002c20| 28 58 20 41 73 20 49 6e | 74 65 67 65 72 2c 20 59 |(X As In|teger, Y|
|00002c30| 20 41 73 20 49 6e 74 65 | 67 65 72 29 1e 69 66 20 | As Inte|ger).if |
|00002c40| 58 20 3c 20 6d 65 2e 77 | 69 64 74 68 20 61 6e 64 |X < me.w|idth and|
|00002c50| 20 58 20 3e 20 30 20 74 | 68 65 6e 00 1f 69 66 20 | X > 0 t|hen..if |
|00002c60| 59 20 3c 20 6d 65 2e 68 | 65 69 67 68 74 20 61 6e |Y < me.h|eight an|
|00002c70| 64 20 59 20 3e 20 30 20 | 74 68 65 6e 00 14 69 66 |d Y > 0 |then..if|
|00002c80| 20 6d 65 2e 73 74 61 74 | 65 20 3d 20 31 20 74 68 | me.stat|e = 1 th|
|00002c90| 65 6e 0b 27 64 6f 77 6e | 20 73 74 61 74 65 0c 6d |en.'down| state.m|
|00002ca0| 65 2e 73 74 61 74 65 20 | 3d 20 32 09 6d 65 2e 64 |e.state |= 2.me.d|
|00002cb0| 6f 77 6e 28 29 06 72 65 | 74 75 72 6e 06 65 6e 64 |own().re|turn.end|
|00002cc0| 20 69 66 00 04 65 6c 73 | 65 00 14 69 66 20 6d 65 | if..els|e..if me|
|00002cd0| 2e 73 74 61 74 65 20 3d | 20 32 20 74 68 65 6e 09 |.state =| 2 then.|
|00002ce0| 27 75 70 20 73 74 61 74 | 65 0c 6d 65 2e 73 74 61 |'up stat|e.me.sta|
|00002cf0| 74 65 20 3d 20 31 07 6d | 65 2e 75 70 28 29 06 72 |te = 1.m|e.up().r|
|00002d00| 65 74 75 72 6e 06 65 6e | 64 20 69 66 06 65 6e 64 |eturn.en|d if.end|
|00002d10| 20 69 66 00 04 65 6c 73 | 65 00 14 69 66 20 6d 65 | if..els|e..if me|
|00002d20| 2e 73 74 61 74 65 20 3d | 20 32 20 74 68 65 6e 09 |.state =| 2 then.|
|00002d30| 27 75 70 20 73 74 61 74 | 65 0c 6d 65 2e 73 74 61 |'up stat|e.me.sta|
|00002d40| 74 65 20 3d 20 31 07 6d | 65 2e 75 70 28 29 06 72 |te = 1.m|e.up().r|
|00002d50| 65 74 75 72 6e 06 65 6e | 64 20 69 66 00 06 65 6e |eturn.en|d if..en|
|00002d60| 64 20 69 66 00 07 45 6e | 64 20 53 75 62 09 4d 6f |d if..En|d Sub.Mo|
|00002d70| 75 73 65 44 6f 77 6e 02 | 00 02 00 0f 39 46 75 6e |useDown.|....9Fun|
|00002d80| 63 74 69 6f 6e 20 4d 6f | 75 73 65 44 6f 77 6e 28 |ction Mo|useDown(|
|00002d90| 58 20 41 73 20 49 6e 74 | 65 67 65 72 2c 20 59 20 |X As Int|eger, Y |
|00002da0| 41 73 20 49 6e 74 65 67 | 65 72 29 20 41 73 20 42 |As Integ|er) As B|
|00002db0| 6f 6f 6c 65 61 6e 0b 27 | 64 6f 77 6e 20 73 74 61 |oolean.'|down sta|
|00002dc0| 74 65 0c 6d 65 2e 73 74 | 61 74 65 20 3d 20 32 09 |te.me.st|ate = 2.|
|00002dd0| 6d 65 2e 64 6f 77 6e 28 | 29 00 93 01 27 69 6e 44 |me.down(|)...'inD|
|00002de0| 6f 77 6e 20 69 73 20 61 | 20 70 72 6f 70 65 72 74 |own is a| propert|
|00002df0| 79 20 74 68 61 74 20 69 | 73 20 74 65 6c 6c 69 6e |y that i|s tellin|
|00002e00| 67 20 74 68 65 20 6d 6f | 75 73 65 45 78 69 74 20 |g the mo|useExit |
|00002e10| 6d 65 74 68 6f 64 20 74 | 68 61 74 20 74 68 65 20 |method t|hat the |
|00002e20| 6d 6f 75 73 65 20 68 61 | 73 20 62 65 65 6e 20 91 |mouse ha|s been .|
|00002e30| 01 27 70 75 73 68 65 64 | 20 61 6e 64 20 69 73 20 |.'pushed| and is |
|00002e40| 73 74 69 6c 6c 20 64 6f | 77 6e 2e 20 20 49 66 20 |still do|wn. If |
|00002e50| 69 6e 44 6f 77 6e 20 69 | 73 20 74 72 75 65 20 77 |inDown i|s true w|
|00002e60| 68 65 6e 20 74 68 65 20 | 6d 6f 75 73 65 45 78 69 |hen the |mouseExi|
|00002e70| 74 20 6d 65 74 68 6f 64 | 20 69 73 20 66 69 72 65 |t method| is fire|
|00002e80| 64 2c 2c 27 74 68 65 20 | 62 75 74 74 6f 6e 27 73 |d,,'the |button's|
|00002e90| 20 73 74 61 74 65 20 69 | 73 20 75 70 20 69 6e 73 | state i|s up ins|
|00002ea0| 74 65 61 64 20 6f 66 20 | 6e 6f 72 6d 61 6c 2e 10 |tead of |normal..|
|00002eb0| 6d 65 2e 69 6e 44 6f 77 | 6e 20 3d 20 74 72 75 65 |me.inDow|n = true|
|00002ec0| 00 94 01 27 73 65 74 74 | 69 6e 67 20 74 68 65 20 |...'sett|ing the |
|00002ed0| 62 75 74 74 6f 6e 20 63 | 75 72 73 6f 72 20 74 6f |button c|ursor to|
|00002ee0| 20 74 68 65 20 66 69 6e | 67 65 72 20 70 6f 69 6e | the fin|ger poin|
|00002ef0| 74 65 72 20 69 66 20 74 | 68 65 20 75 73 65 72 20 |ter if t|he user |
|00002f00| 73 74 61 72 74 73 20 64 | 72 61 67 67 69 6e 67 20 |starts d|ragging |
|00002f10| 61 72 6f 75 6e 64 20 12 | 27 69 6e 73 69 64 65 20 |around .|'inside |
|00002f20| 74 68 65 20 62 75 74 74 | 6f 6e 30 6d 65 2e 6d 6f |the butt|on0me.mo|
|00002f30| 75 73 65 63 75 72 73 6f | 72 20 3d 20 61 70 70 2e |usecurso|r = app.|
|00002f40| 72 65 73 6f 75 72 63 65 | 46 6f 72 6b 2e 67 65 74 |resource|Fork.get|
|00002f50| 63 75 72 73 6f 72 28 31 | 33 39 29 0b 72 65 74 75 |cursor(1|39).retu|
|00002f60| 72 6e 20 74 72 75 65 0c | 45 6e 64 20 46 75 6e 63 |rn true.|End Func|
|00002f70| 74 69 6f 6e 05 50 61 69 | 6e 74 02 00 02 00 13 18 |tion.Pai|nt......|
|00002f80| 53 75 62 20 50 61 69 6e | 74 28 67 20 41 73 20 47 |Sub Pain|t(g As G|
|00002f90| 72 61 70 68 69 63 73 29 | 00 0b 73 65 74 43 6f 6c |raphics)|..setCol|
|00002fa0| 6f 72 73 28 29 29 27 64 | 72 61 77 69 6e 67 20 74 |ors())'d|rawing t|
|00002fb0| 68 65 20 62 75 74 74 6f | 6e 73 20 69 6e 20 74 68 |he butto|ns in th|
|00002fc0| 65 20 63 6f 72 72 65 63 | 74 20 73 74 61 74 65 00 |e correc|t state.|
|00002fd0| 14 69 66 20 6d 65 2e 73 | 74 61 74 65 20 3d 20 31 |.if me.s|tate = 1|
|00002fe0| 20 74 68 65 6e 09 27 75 | 70 20 73 74 61 74 65 07 | then.'u|p state.|
|00002ff0| 6d 65 2e 75 70 28 29 00 | 18 65 6c 73 65 69 66 20 |me.up().|.elseif |
|00003000| 6d 65 2e 73 74 61 74 65 | 20 3d 20 32 20 74 68 65 |me.state| = 2 the|
|00003010| 6e 0b 27 64 6f 77 6e 20 | 73 74 61 74 65 09 6d 65 |n.'down |state.me|
|00003020| 2e 64 6f 77 6e 28 29 00 | 18 65 6c 73 65 69 66 20 |.down().|.elseif |
|00003030| 6d 65 2e 73 74 61 74 65 | 20 3d 20 30 20 74 68 65 |me.state| = 0 the|
|00003040| 6e 0d 27 6e 6f 72 6d 61 | 6c 20 73 74 61 74 65 0b |n.'norma|l state.|
|00003050| 6d 65 2e 6e 6f 72 6d 61 | 6c 28 29 06 65 6e 64 20 |me.norma|l().end |
|00003060| 69 66 00 07 45 6e 64 20 | 53 75 62 00 00 00 |if..End |Sub... |
+--------+-------------------------+-------------------------+--------+--------+